
How to configure routing in yii framework
How to configure routing in the yii framework: 1. Enable the rewrite module in httpd.conf; 2. Add the server configuration file [.htaccess] in the directory; 3. Add urlManager to the framework configuration item \frontend\config\main.php Configuration items.
Feb 18, 2020 am 10:47 AM
How does composer update the yii2 version
How to update the yii2 version with composer: first make sure the latest Composer resource plug-in is installed; then execute php composer.phar update yiisoft/yii2 to upgrade Yii2.
Feb 18, 2020 am 10:20 AM
yii2.0 determines ios or Android
The method for yii2 to determine whether ios or Android is: first create a get_device_type function; then use Yii::$app->request->userAgent within the function to obtain the user browser UA; finally use the strpos function to find the UA characteristic strings of Android and ios. Can.
Feb 18, 2020 am 10:04 AM
How to set the yii2 verification code style
How to set the yii2 verification code style: first rewrite the method in any controller and configure the verification code style in captcha; then modify the form model and specify verifyCode as captcha; finally use ActiveForm to generate the corresponding fields.
Feb 17, 2020 pm 05:57 PM
How to set pseudo-static in yii framework
The method to set up pseudo-static in the yii framework is: 1. Modify the httpd.conf configuration file and configure the apache server; 2. Modify the nginx.conf configuration file and configure the nginx server; 3. Modify the web.php file and configure the yii code.
Feb 17, 2020 pm 05:44 PM
yii2 determines whether it comes from WeChat browser
The method for yii2 to determine from WeChat browser: first define a function is_weixin(); then use Yii::$app->request->userAgent within the function to obtain the user UA; finally use the strpos() function to find the WeChat browser in the UA Character strings are sufficient.
Feb 17, 2020 pm 05:42 PM
How to view the sql statements executed by the current program in yii2
The method for yii2 to view the sql statement executed by the current program is: 1. [$query = model::find();]; 2. [$query->createCommand()->getRawSql();].
Feb 17, 2020 pm 05:29 PM
How to record API interface execution time in Yii
Yii's method of recording the execution time of the API interface: inherit the beforeAction and afterAction hooks of the parent class in BaseController, such as [$afterAction=parent::afterAction($action,$result)].
Feb 17, 2020 pm 05:17 PM
Yii implements querying a piece of data based on id
Yii implements the method of querying a piece of data based on id: 1. [SELECT*FROM agency where ag_id=$ag_id)]; 2. [$ag_id=$_GET['ag_id'];?$data=$model->selecto($ ag_id);].
Feb 17, 2020 pm 04:48 PM
Three ways to operate the database in yii
There are three ways to operate the database in yii: 1. PDO, such as [xx::model()->dbConnection->createCommand($sql)->execute();]; 2. [Active Record]; 3. [Query Builder 】.
Feb 17, 2020 pm 04:36 PM
How to generate QR code in yii2
The method for yii2 to generate QR code is: 1. Add ["2amigos/yii2-qrcode-helper" : "*"] to the composer.json file of the corresponding project; 2. Call the QR code generation method in the controller; 3. Access the demo method.
Feb 17, 2020 pm 04:25 PM
Where is the entry file of the yii framework?
The entry file of the yii framework is the index.php file in the web folder. Yii also has another entry file, which is the entry file of the yii2 command line, that is, the yii file in the top directory. If it is an advanced project, the entry file will There's more, but the basics are in one of these two forms.
Feb 17, 2020 pm 04:10 PM
How to update database data in yii
The method for updating database data in yii is: [Customer::updateAll(['status' => 1], ['status'=> '2','uid'=>'1']); ].
Feb 17, 2020 pm 03:52 PM
How to implement page jump in yii
The way Yii implements page jumps is to jump in different Controllers, such as [?$this->redirect(array('The controller to jump to/the action in the controller to jump to','parameters'=> 'value',,,,));】.
Feb 17, 2020 pm 03:42 PM
Hot tools Tags

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version
Chinese version, very easy to use
