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

  • How to deploy yii project
    How to deploy yii project
    How to deploy the Yii project: first download the PHP integrated development environment software; then place the Yii project in the site directory; and finally start the web server.
    YII 4084 2020-03-10 18:03:04
  • Chinese garbled characters appear when the yii framework accesses the database
    Chinese garbled characters appear when the yii framework accesses the database
    The solution to Chinese garbled characters when the Yii framework accesses the database is: when entering the SQL statement to insert Chinese data into the terminal, you need to set the encoding environment to utf8 first, such as [set names utf8], and ensure that the inserted data is utf8.
    YII 2126 2020-02-27 14:58:43
  • How to batch update data in Yii
    How to batch update data in Yii
    Yii batch update data method: [if(yourModel::updateAllCounters(['goods_num' => $v],['goods_id' => $k,'user_id' => $id]))].
    YII 3815 2020-02-27 14:34:32
  • Where are the public function files in the Yii framework located?
    Where are the public function files in the Yii framework located?
    Public function files in the Yii framework can be placed in the [./common] directory, which is a public resource directory. First, create a new helps directory under the common directory, and then store the public function files in this directory.
    YII 3362 2020-02-27 14:22:07
  • How to use tool functions in yii framework
    How to use tool functions in yii framework
    How to use tool functions in the Yii framework: 1. First create a file in the project root directory, such as: /utils/function.php; 2. Then edit index.php and add [require (__DIR__.'/../utils/function .php');].
    YII 2104 2020-02-27 14:04:41
  • How to view the SQL statements executed by the current page in Yii
    How to view the SQL statements executed by the current page in Yii
    How to view the sql statements executed by the current page in yii: 1. First configure the index.php file and turn on the debugging mode; 2. Then modify the main.php configuration file; 3. Finally refresh the page to get the sql record file.
    YII 3323 2020-02-27 11:52:29
  • How to convert time format in yii framework
    How to convert time format in yii framework
    Time format conversion method in Yii framework: Just add rules in the rules method in the model class, such as [['create_time', 'filter', 'filter' => function(){return strtot].
    YII 2478 2020-02-27 11:42:38
  • yii2 cannot access gii under linux
    yii2 cannot access gii under linux
    The solution to the problem that yii2 cannot access gii under Linux is: just add your own IP in conf/main-local.php, such as ['allowedIPs' => ['127.0.0.1', '::1']] .
    YII 2026 2020-02-27 11:22:16
  • yii2 routing configuration
    yii2 routing configuration
    yii2 routing configuration: ['urlManager'=>array('showScriptName' => true,'urlFormat'=>'path','caseSensitive' => true].
    YII 3015 2020-02-27 11:07:56
  • How to modify the default style in yii2
    How to modify the default style in yii2
    The method to modify the default style of yii2 is: first create the layout, and then add the layout in frontend/config/main.php, for example: [return['layout'=>'xxx','id'=>'app- frontend']].
    YII 3208 2020-02-26 17:14:00
  • How does yii2 determine whether it is a post submission form?
    How does yii2 determine whether it is a post submission form?
    The method for yii2 to determine whether it is a post submission form is: [​if(Yii::$app->request->isPost){return true; }else{return false;}].
    YII 1947 2020-02-26 17:00:06
  • gii cannot be accessed in yii framework
    gii cannot be accessed in yii framework
    Solution to the inability to access gii in the yii framework: add ['allowedIPs'=>['*']], such as [$config['modules']['gii']=['class'=> 'yii\gii\ Module','allowedIPs'=>['*']].
    YII 2659 2020-02-26 16:49:46
  • How to execute native sql statement query in yii2
    How to execute native sql statement query in yii2
    The method for yii2 to execute native sql statement query is: [Yii::$app->getDb()->createCommand("Your SQL")->queryAll();].
    YII 5298 2020-02-26 16:40:47
  • How to implement file upload in yii framework
    How to implement file upload in yii framework
    The method for implementing file upload in the yii framework: 1. First download the uploadFile class; 2. Then write the html code; 3. Then write the js code; 4. [UploadedFile::getInstance($model, 'business_license')].
    YII 2507 2020-02-26 16:32:45
  • yii2 uses database to record error information
    yii2 uses database to record error information
    How yii2 uses the database to record error information: 1. ['class' => 'yii\log\DbTarget']; 2. Execute the command line to create an error log table; 3. Modify the configuration file backend\config\main.php.
    YII 2592 2020-02-26 16:25:16

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