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:
-
- gii cannot be accessed in yii framework
- The solution to the problem that gii cannot be accessed in the yii framework is: add ['allowedIPs'=>['*']], such as [$config['modules']['gii']=['class'=>'yii\gii \Module','allowedIPs'=>['*']].
- YII 2339 2020-02-20 14:47:35
-
- yii csrf The data you submitted cannot be verified
- The way to solve the problem that Yii prompts you that the submitted data cannot be verified is: 1. Turn off csrf verification and add [public $enableCsrfValidation = false;] to the controller; 2. Add a hidden field to the form; 3. Use ajax to submit .
- YII 2192 2020-02-26 17:13:24
-
- What should I do if composer fails to install yii?
- Solution to composer failure to install yii: 1. Use composer national image; 2. Delete the default warehouse configuration; 3. Solve bower dependencies; 4. Modify bower configuration and point the alias to @vendor/yidas/yii2-bower-asset/ bower.
- YII 3341 2020-02-26 17:15:11
-
- How to execute script files under commands in yii
- The method for yii to execute script files under commands is: 1. Create a new controller script file in the commands directory; 2. Then execute the command [php yii user-test/refresh-userinfo].
- YII 3511 2020-02-20 11:29:56
-
- Failed to assign values to model attributes in Yii
- The solution to the failure to assign values to the attributes of the model in Yii is: in the rules of the model, just set the attributes of the fields you want to modify to safe, such as [array('field1, field2,field3', 'safe')] .
- YII 3368 2020-02-26 17:14:24
-
- yii2 server 500 error
- Solution to yii2 server 500 error: 1. First enable [defined('YII_DEBUG') or define('YII_DEBUG', true);]; 2. Then change the permissions of the assets file to the highest permission of 777.
- YII 2719 2020-02-20 10:47:50
-
- How to make the primary key automatically increase in Yii
- The method to automatically increase the primary key in Yii: 1. Use the updateAllCounters method and pass in count=>1 to realize the value auto-increment; 2. Use the updateAll method and pass in count+1 to realize the value auto-increment.
- YII 3020 2020-02-26 17:17:21
-
- How to install yii with xampp
- The method for xampp to install yii is: 1. Download the composer installation package; 2. Download the yii2 archive file and extract it to the web project directory; 3. Install yii2 and modify the php.ini configuration file; 4. Start apache and mysql and test the installation result.
- YII 3185 2020-02-20 10:37:13
-
- What to do if yii2 widget reference fails
- Solution to yii2 widget reference failure: 1. Use composer to install the widget; 2. Manually install the widget. You need to unzip the file to vendor/kartik/select2, and then add widget-related code in autoload and extens.
- YII 1658 2020-02-20 10:09:40
-
- How to initialize yii2 advanced version
- Initialization method of yii2 advanced version: Execute the script [./init] under the root directory of yii2. After the initialization is completed, the yii file and other file initialization configurations will appear, as well as modify file permissions, etc.
- YII 2529 2020-02-19 17:07:23
-
- How to deploy the yii framework
- Methods for deploying the yii framework: 1. Set up a PHP environment and download the yii framework; 2. Check whether the current environment meets the requirements of the yii framework; 3. Create a project and use yiic to deploy; 4. Visit the project address to check whether the deployment is successful.
- YII 3221 2020-02-19 16:47:40
-
- How to insert data in batches in Yii
- Methods for batch inserting data in yii: 1. [$_model = clone $model;$_model->save();]; 2. [$model->isNewRecord = true;$model->save() && $model-> id=0;].
- YII 2636 2020-02-19 16:28:21
-
- Yii framework implements email sending
- How to implement email sending in Yii framework: 1. Open the main-local.php file and configure the [components=>[]] option; 2. Edit the controller controller, such as [$mail->setTo('****** *****@qq.com');].
- YII 2645 2020-02-19 16:11:01
-
- How to add js code to View in yii2
- yii2 method of adding js code to View: 1. Introduce the js file before the code, such as [<?php $this->registerJsFile('@web/js/jquery.js');?>]; 2. Use Global js file.
- YII 3024 2020-02-19 15:50:52
-
- What should I do if the yii2 submission form prompts that it cannot be verified?
- The solution to the yii2 submission form prompt that it cannot be verified is: 1. Turn off Csrf verification; 2. Add a hidden field to the form; 3. Add the _csrf field in AJAX, such as [data:{_csrf:csrfToken}].
- YII 2363 2020-02-19 15:39:43