current location:Home > Technical Articles > PHP Framework > YII
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to use widgets of yii framework
- The widgets of the yii framework are basically used in views. In the views, the yii\base\Widget::widget() method can be called to use the widgets. This method initializes the widget using the configuration array and returns the result of the widget being rendered.
- YII 2265 2019-12-23 16:34:32
-
- How to solve Chinese garbled characters in yii framework
- Solution to Chinese garbled characters in the yii framework: 1. It may be caused by the incorrect encoding format when saving the yii file. This can be solved by changing the default encoding format of the editing tool to utf-8. 2. Specify the encoding format as utf-8 when connecting to the database in Yii.
- YII 2872 2019-12-23 16:02:08
-
- Cookie settings are invalid in yii2
- The reason why the cookie setting in yii2 is invalid is that the [die] or [exit] statement is artificially added, resulting in the set [cookies] not being sent to the client. The solution is: when using the [add] method to insert the [cookie] item, the following code cannot have exit or end statements.
- YII 2766 2019-12-18 16:46:00
-
- How to introduce CSS and JS files in Yii2 framework
- Use use at the top of the front view to call the code segment use yii\helpers\Html;; then in the following Html you can call <?=Html::jsFile('@web/js file path')?> like this.
- YII 2464 2019-12-18 14:59:48
-
- How to determine whether the data table exists in the database in Yii
- The method to determine whether the data table exists in the database in Yii is: 1. First, you need to find out all the table names in the database and save the table names into a two-dimensional array; 2. Then further determine whether the table name exists in the database. in a dimensional array.
- YII 2753 2019-12-17 17:10:51
-
- How to set yii2 not to use layout
- The method to set up yii2 not to use layout is: 1. Set the layout attribute member variable in the controller file to [false]; 2. Set the layout attribute member method in the controller file to [false]; 3. Close it in the view file. Just choose a layout.
- YII 3073 2019-12-17 17:01:15
-
- The verification code image is not displayed in yii2
- The reasons and solutions for the verification code image not being displayed in yii2 are: 1. The BOM problem cannot be displayed, just delete the BOM in the PHP code involving the BOM in the file; 2. The output buffer is not cleared, before outputting the image, add [ob_clean] method can clear the output buffer.
- YII 2914 2019-12-17 16:45:51
-
- How to import css and js files into yii2
- The methods for importing css and js files in yii2 are: 1. You can directly import the files on the view page; 2. You can directly write native code to import the files; 3. There is no need to define methods in the resource package manager, you only need to add them to the view page Just import the file directly.
- YII 2724 2019-12-17 16:19:48
-
- What are the sorting methods in yii
- Yii uses the yii\data\Sort object to represent information about the sorting scheme. Sorting methods are: attributeOrders: gives the sorting direction currently set for each attribute. orders: Gives the sorting direction in terms of low-level columns.
- YII 3251 2019-12-17 16:18:54
-
- How to transfer value when yii page jumps
- Methods for passing values in yii page jump: 1. Page jump in the same Controller: $this->render('view page',array('parameter'=>'value'));. 2. Use the $this->redirect method to pass values when jumping to pages in different Controllers.
- YII 2216 2019-12-17 15:40:03
-
- How to reference external files in Yii
- Methods to reference external files in Yii: 1. Introduce the external file path in Yii's ../config/main.php. 2. Use the "Yii::app()->basePath" method in the Yii code to reference external files.
- YII 2589 2019-12-17 15:32:17
-
- How to execute cmd command on e disk yii
- How to execute the cmd command on the e-disk yii: 1. Create a new controller script file in the "commands" directory. 2. Use the command "php yii project location/yii+controller name/method name" in cmd.
- YII 3471 2019-12-17 14:41:44
-
- How to import public files into Yii
- How to load public files: 1. Use JS to define public methods and load them on the page that needs to be loaded. 2. Use widgets and define widgets to perform loading. 3. Use beginContent to load the file directly.
- YII 2040 2019-12-17 14:26:28
-
- How to check server 500 error in yii2
- How to check the server 500 error in yii2: 1. Change defined('YII_DEBUG') in index.php to define('YII_DEBUG',true). 2. Change the permissions of the assets folder to 777.
- YII 3332 2019-12-17 14:10:03
-
- How to get errors in yii model
- In Yii, use the "$errors=$model->getErrors();" statement to obtain all error information. getErrors(): returns errors for all attributes or a single attribute, that is, returns all errors that occurred during verification.
- YII 2745 2019-12-17 14:03:03