这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。
这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。
In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.
当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。
Hi Friends,
In this wiki I will show how could forcing login for all pages and users must be logged in to access almost all of the site’s content.
Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.
Assalamualaikum wr.wb Hello yii people i'm Muhammad Fahmi Azain this is tutorial about forgot password in yii framework, and i'm sorry if it does not comply with code standards yii. okay let's begin
In this wiki I will show how could logout from all other sessions or all other places.
Translation from .txt file Note:
The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.
The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.
Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components
and modify your
params.php
` file like this:
I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:
Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template
This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install.
After installation done, create controller
and action
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.
Create param.php file in protected/config
Yii::app()->params['TEXT_ACTIVE'] = 'Active'; //1 for active
In Yii 1.x, there was a built in widget CStarRating
based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.