
How to open gii in yii framework
The gii module can be enabled by configuring the yii\base\Application::modules property. First configure the config/web.php file, then open the web/index.php entry script and set "YII_ENV_DEV" to true.
Dec 09, 2019 am 09:53 AM
What to do if a 500 error occurs in yii2.0
First open web/index.php defined('YII_DEBUG') or define('YII_DEBUG', true); and change this to true. The asserts folder and its files have insufficient permissions, making them inaccessible. Just change them to 777.
Dec 09, 2019 am 09:33 AM
How to customize yii components
First create the components folder under common, then create a custom component in the newly created components folder, then open common/config/main.php (main-local.php) and add your component in the configuration file.
Dec 07, 2019 pm 05:56 PM
What is the difference between yii1 and yii2
Difference: Yii2 application instances directly use global named variables to access: $app without calling app(). A significant change in the view layer of Yii2 is the introduction of view classes. Yii2 introduces the concept of resource packages, and the way of resource reference changes greatly.
Dec 07, 2019 pm 04:28 PM
How to upload pictures in yii2
First, build the upload class and create a product table with fields id, name, and picurl. Then use GII to generate PRODUCT models, classes, and views. Place main.css in \css, main.js in \asses, and then register these two files in AppAsset.php.
Dec 07, 2019 pm 04:20 PM
How to get the current url in yii framework
How to get the current url in Yii framework: You can directly use the command "\Yii::$app->request->hostInfo;" to get the current domain name, you can use the command "\Yii::$app->request->getUrl(); "Get the url except the domain name.
Dec 07, 2019 pm 04:08 PM
What should I do if the yii2 entry file cannot be found?
First, double-click the init.bat file in the root directory, or cmd to the Yii directory to execute the php init command. Then enter the scene you want to select: 0 or 1, and press Enter. Determine whether to execute generation: y/n, press Enter. The entry file of the framework will be generated in the frontend/web directory and can be accessed through the address.
Dec 07, 2019 pm 04:01 PM
What should I do if a 403 error occurs on the yii2 website?
gii tool configuration: 'gii'=>['class'=>'yii\gii\Module','allowedIPs'=>['127.0.0.1','::1','192.168.0.*',' 192.168.178.20'] will do.
Dec 07, 2019 pm 03:52 PM
How to conditionally query in yii framework
Conditional query: "$customers = Customer::find()->where($cond)->all();". $cond is what we call a condition, and the way the condition is written varies depending on the query data.
Dec 07, 2019 pm 03:33 PM
Check whether yii is installed successfully
How to check whether yii is installed successfully: After installing the yii framework, open the browser and enter http://localhost/../index.php in the browser to check whether the yii framework is installed successfully.
Dec 07, 2019 pm 02:44 PM
How to re-url in yii
The method to re-"url" in "yii" is: 1. Change the project address to static mode (pseudo-static===Url routing management). This process requires the support of the "apache" function module (url rewriting module) ; 2. Edit the project configuration file; 3. Use the "createUrl" method of the framework.
Dec 07, 2019 am 11:48 AM
After yii2 adds a field to the database table, the corresponding model cannot recognize the attribute.
The reason why the corresponding model cannot recognize the attribute after "yii2" adds a field to the database table is: the structure of the database table should be cached. The solution is: delete the "runtime" folder or clear the cached data of the specified database table structure.
Dec 07, 2019 am 11:17 AM
Comparison of yii2 and laravel framework
Comparison between the "yii2" framework and the "laravel" framework: Comparing in terms of development speed, the "yii" framework can use the "gii" scaffolding to quickly generate code without the need to write special effects and styles, while "laravel" can also Quickly create controllers, models, routes, etc. with the help of "artisan" tools.
Dec 07, 2019 am 11:04 AM
Solution to garbled yii2 page
Solution to the garbled code on the yii2 page: Configuring the encoding format in the database configuration can solve the problem. The setting statement is: "'dsn'=>'mysql:host=127.0.0.1;dbname=ohmycto;charset=utf8',".
Dec 07, 2019 am 11:02 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
