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

  • yii2 uses the inequality sign to query
    yii2 uses the inequality sign to query
    yii2 query method using the inequality sign: [$details=MovieShows::find()->where(['movie_id'=>$id])->andWhere(['<>','cancel_date', $date ])->all()】.
    YII 4808 2020-02-26 14:32:24
  • How to submit ajax in yii2
    How to submit ajax in yii2
    Ajax submission method in yii2: [$form = ActiveForm::begin(['id' => $model->formName(),'action' => ['/apitools/default/index']]);].
    YII 1918 2020-02-26 12:02:06
  • Where does the yii2 framework need to be decompressed after downloading it?
    Where does the yii2 framework need to be decompressed after downloading it?
    After downloading the yii2 framework, you need to unzip it to the website root directory of the local server, which is the WWW directory. If you are using an integrated environment, such as phpstudy, then the corresponding website root directory is: [../phpstudy/WWW].
    YII 1811 2020-02-26 11:42:40
  • How to modify the database connection in yii2
    How to modify the database connection in yii2
    How to modify the database connection in yii2: just overwrite the [yii\db\ActiveRecord::getDb()] method, such as [public static function getDb(){return \Yii::$app->db2;}].
    YII 3008 2020-02-26 11:28:30
  • How to set the time zone in yii2.0
    How to set the time zone in yii2.0
    The method to set the time zone in yii2.0 is: first open the main.php file, and then add the configuration ['timeZone' => 'Asia/Shanghai', 'dateFormat' => 'yyyy-MM-dd'].
    YII 2612 2020-02-25 17:34:10
  • How to output error message in yii2
    How to output error message in yii2
    The method for yii2 to output error information is: You can use the error handler [error handler]. The error handler adjusts the error display according to the value of the constant YII_DEBUG. When YII_DEBUG is false, only the error information will be displayed.
    YII 5425 2020-02-25 17:17:49
  • How to customize 500 error in yii2
    How to customize 500 error in yii2
    The method for customizing 500 errors in yii2 is: 1. Create an ErrorHandler, inherit the yii\base\ErrorHandler abstract class, and then define the abstract method in this parent class; 2. Create a view file; 3. Modify the configuration file.
    YII 2558 2020-02-20 16:15:31
  • The difference between yii1 and yii2
    The difference between yii1 and yii2
    The difference between yii1 and yii2: the difference in controller calls, such as yii1: [index.php?r=userGroup/index&page=1], yii2: [index.php?r=user-group/index&page=1].
    YII 3865 2020-02-20 16:02:00
  • How to execute php script in yii
    How to execute php script in yii
    Methods for executing php scripts in Yii: 1. [yiic.bat Test Index]; 2. [yiic Test Index]; 3. Generate script [.bat] files and execute them regularly.
    YII 2662 2020-02-20 15:52:04
  • How to install the yii1.1 framework
    How to install the yii1.1 framework
    yii1.1 framework installation method: 1. Download the yii1.1 compressed package from the yii Chinese community and extract it to the www root directory; 2. Run the command [yiic webapp ../../testyii]; 3. Visit www/testyii, Check whether the installation is successful.
    YII 3018 2020-02-26 17:16:37
  • Redirect in yii cannot jump normally
    Redirect in yii cannot jump normally
    The solution to the problem that redirect in Yii cannot jump normally is: [$this->redirect(login page address)->send(); $this->redirect(login page address);Yii::$app->response-> send();].
    YII 3193 2020-02-20 15:15:45
  • An error message appears when creating a model in yii
    An error message appears when creating a model in yii
    The solution to the error message when creating a model in Yii is to enable the PDO extensions [extension=php_pdo.dll] and [extension=php_pdo_mysql.dll].
    YII 2421 2020-02-20 15:05:03
  • The writing position of js code in yii framework
    The writing position of js code in yii framework
    The writing position of js code in yii framework: [<?php $this->beginBlock('script'); ?><script>js code</script><?php $this->endBlock(); ?>].
    YII 2816 2020-02-20 14:53:40
  • gii cannot be accessed in yii framework
    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 2317 2020-02-20 14:47:35
  • yii csrf The data you submitted cannot be verified
    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 2162 2020-02-26 17:13:24

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