current location:Home > Technical Articles > PHP Framework > YII

  • How does composer update the yii2 version
    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.
    YII 4128 2020-02-18 10:20:04
  • yii2.0 determines ios or Android
    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 2119 2020-02-18 10:04:12
  • How to set the yii2 verification code style
    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 2932 2020-02-17 17:57:27
  • How to set pseudo-static in yii framework
    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 4104 2020-02-17 17:44:49
  • yii2 determines whether it comes from WeChat browser
    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 2739 2020-02-17 17:42:28
  • How to view the sql statements executed by the current program in yii2
    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 3990 2020-02-17 17:29:40
  • How to record API interface execution time in Yii
    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 3112 2020-02-17 17:17:38
  • Yii implements querying a piece of data based on id
    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 3332 2020-02-17 16:48:49
  • Three ways to operate the database in yii
    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 2518 2020-02-17 16:36:15
  • How to generate QR code in yii2
    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 3615 2020-02-17 16:25:35
  • Where is the entry file of the yii framework?
    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 4534 2020-02-17 16:10:36
  • How to update database data in yii
    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 3615 2020-02-17 15:52:29
  • How to implement page jump in yii
    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 2768 2020-02-17 15:42:46
  • How does yii determine whether it is an ajax submission?
    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 2531 2020-02-17 15:19:43
  • How to enable the debug bar in yii2
    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 3621 2020-02-17 15:06:42

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28