
How to modify the default homepage of yii2.0 framework
How to modify the default homepage in the yii2.0 framework: 1. Modify under the configuration file main.php. 2. Add ‘defaultRoute’ => ‘default’ in the return array under the configuration file, and then create the Default controller and Index method.
Jan 11, 2020 pm 04:06 PM
yii determines whether post submission
How to determine whether a post submission is made in Yii: In the controller, determine whether the submission is through the post method. Use the "if(Yii::$app->request->isPost)" statement to determine. If the condition is true, it means a post submission.
Jan 11, 2020 pm 03:58 PM
How to implement registration in yii2 framework
The method for realizing registration in the yii2 framework: After submitting the registration information in the yii framework, the rules() function will perform preliminary verification. After all the formats are correct, the data will be transferred to the actionSignup() function, and then the registration information will be loaded in the signup() function.
Jan 11, 2020 pm 03:30 PM
How to define error page in yii2
How to define an error page in yii2: first set the error page style in the views/site/error.php file. Then use the "'errorAction'=>'site/error'," statement in the config/main.php file to call it.
Jan 11, 2020 pm 03:09 PM
Where is the database configuration information of yii
The yii public database configuration file is in /common/config/main-local.php. If the frontend and backend are different: the frontend is in /frontend/config/main-local.php and the backend is in /backend/config/main-local.php.
Jan 11, 2020 pm 02:42 PM
What should I do if the yii verification code does not display pictures?
The reason why the yii verification code does not display images is because of permission issues in the controller. The solution is to add code in the controller as "public function behaviors(){'only' => ['logout', 'signup','login'] ,}" and save it.
Jan 11, 2020 am 11:40 AM
Settings for yii 500 error page
How to set up the yii 500 error page: first create "ErrorHandler" to inherit the "yii\base\ErrorHandler" abstract class; then define the abstract method in this parent class; then create the view file "error.php"; and finally modify the application configuration The file "main" will do.
Jan 11, 2020 am 10:57 AM
How to load yii css file
How to load yii css files: First use the code "use yii\helpers\Html;" to introduce the file in the front view; then use the code "<?=Html::cssFile('@web/***/css) in Html /***.css')?>" just call it.
Jan 10, 2020 pm 05:36 PM
What should I do if the yii framework displays a 500 error?
The solution to the 500 error displayed by the yii framework: first open the "index.php" file; then modify the code to "defined('YII_DEBUG')ordefine('YII_DEBUG', true);"; then modify the assets folder permissions to "777 "That's it.
Jan 09, 2020 am 10:46 AM
yii error reporting level
How to set the yii error level: first open the yii project entry file; then add the code as "error_reporting(E_ALL^E_NOTICE)"; then open the php configuration file and set the code as "error_reporting=E_ALL&~E_NOTIC".
Jan 09, 2020 am 10:41 AM
How to connect to the database in yii
How to connect yii to the database: first establish a connection with the database server; then find the "component" component; then use "yii\db\Connection" to connect to the database, the code is "'db'=>['class'=>'yii\ db\Connection']".
Jan 09, 2020 am 10:34 AM
yii2 404 error handling
Yii2 404 error handling method: first enter the "frontend\config" folder of the yii framework; then open the "main.php" file and modify the controller name and method name; then enter "controllers" to create the controller; finally, in Just create a view on the "V" layer.
Jan 09, 2020 am 10:28 AM
How to install git clone yii
How to install yii through git cloning: first open the github address of the yii framework; then clone to a web-accessible directory and enter the directory; then use the command "composer global" to install the plug-in; finally cd to the framework directory and execute the command "create-project" "That's it.
Jan 09, 2020 am 10:22 AM
How to deploy yii
How to deploy a yii project: First, unzip the downloaded "yii" package into the built environment; then copy the core file "framework" to the project you want to build; then configure the environment variables to complete the "yii" project deploy.
Jan 09, 2020 am 10:16 AM
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
