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 Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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.
- YII 2145 2020-02-18 10:04:12
-
- 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.
- YII 2952 2020-02-17 17:57:27
-
- 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.
- YII 4176 2020-02-17 17:44:49
-
- 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.
- YII 2769 2020-02-17 17:42:28
-
- 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();].
- YII 4022 2020-02-17 17:29:40
-
- 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)].
- YII 3130 2020-02-17 17:17:38
-
- 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);].
- YII 3350 2020-02-17 16:48:49
-
- 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 】.
- YII 2597 2020-02-17 16:36:15
-
- 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.
- YII 3643 2020-02-17 16:25:35
-
- 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.
- YII 4551 2020-02-17 16:10:36
-
- How to update database data in yii
- The method for updating database data in yii is: [Customer::updateAll(['status' => 1], ['status'=> '2','uid'=>'1']); ].
- YII 3689 2020-02-17 15:52:29
-
- 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',,,,));】.
- YII 2785 2020-02-17 15:42:46
-
- How does yii determine whether it is an ajax submission?
- The method for Yii to determine whether it is an ajax submission is: [if (Yii::$app->request >isAjax) {// request is ajax request} else{//not ajax request}].
- YII 2547 2020-02-17 15:19:43
-
- How to enable the debug bar in yii2
- The method to enable the debugging bar in yii2 is: 1. First open the web.php file in the config directory; 2. Then find the allowedIPs option; 3. Finally, add your current IP address to the allowedIPs option.
- YII 3662 2020-02-17 15:06:42
-
- Where to place public methods in Yii
- Public methods in Yii can be placed in the [./common] directory, because the [./common] directory is a public resource directory, such as [namespace common\helps; class tools{public static function hello(){}].
- YII 3093 2020-02-17 14:54:16