
How to install yii2.0
First install Composer, then install the Yii framework, unzip and put the file package into the project root directory of the server. Then open the web.config file in the config folder, find cookieValidationKey, add the password and save it.
Dec 09, 2019 pm 02:42 PM
How to query data in yii2
Query method: Return all data: User::find()->all(); Return a piece of data with primary key id=1: User::findOne($id); Sort query: User::find()->orderBy( 'id DESC')->all(), etc.
Dec 09, 2019 pm 02:17 PM
How to create your own project in yii
How to create your own project in yii: Use the "yiic webapp E:\wamp\www\yii\shop" command to specify the project name and project path to be created, and then enter yes in the next prompt to create the project.
Dec 09, 2019 pm 01:56 PM
How to write subquery in yii2 framework
子查詢:“$subQuery = Order::find(), where(['user_id' => $userId]), andWhere(['status' => $status]);”.
Dec 09, 2019 pm 01:52 PM
yii determines whether to submit in get mode
Yii2 provides several functions to determine the submission method, in the Yii::$app component. Use "Yii::$app->request->isGet" to determine whether it is submitted in get mode. If it is submitted in get mode, 1 will be returned.
Dec 09, 2019 pm 01:44 PM
How to print sql statements in yii framework
The yii framework can use "Model::find()->createCommand()->getRawSql();" or "$model->find()->createCommand()->getRawSql();" to print sql statements.
Dec 09, 2019 pm 01:40 PM
How to sort yii2.0 tables
Yii2.0 table sorting can be implemented using the Sort class. Using yii\data\Sort, you must first declare what attributes can be sorted, then obtain the currently set sorting information from attributeOrders or orders, and then use them to customize data queries.
Dec 09, 2019 pm 01:37 PM
How to call extension class in php yii
Introduce and define in the config.php file: 'components'=>array('xyz'=>array('class'=>'ext.xyz.XyzClass', 'property'=>'value',).
Dec 09, 2019 pm 01:25 PM
How to generate verification code in yii2
First add the verification code in the controller, then call the verification code through $code = $c->getVerifyCode();, and then write <img src=this action access URL + random string to prevent caching.
Dec 09, 2019 pm 01:05 PM
Is gii based on the yii framework?
Gii is a module in the Yii framework. In my opinion, Gii is a rapid creator. It is a good tool for rapid development. Gii is implemented as a module, which must be used in an existing Yii application.
Dec 09, 2019 am 11:49 AM
What cache is used for yii2 user login?
The yii2 user logs in using the DataCache cache. The cache file will be found in a folder called te in the runtime\cache directory, where test.bin is the cache file of the data. Commonly used methods: set(), get(), add(), multiGet(), etc.
Dec 09, 2019 am 11:39 AM
How to format data in yii2
yii\i18n\Formatter is a formatting assistant, which is very helpful for us to achieve user-friendly display on the front end. Common properties: $dateFormat, $datetimeFormat, $locale, $defaultTimeZone.
Dec 09, 2019 am 11:25 AM
What does component mean in yii2?
Component is the main component of YII framework application (application). It is an instance or subclass of [yii\base\Component]. Components have three important characteristics: properties, events, and behaviors.
Dec 09, 2019 am 11:15 AM
What is the difference between yii2 batch and each
When we need to read all or a large batch of data at once, we can use the batch and each methods to reduce memory usage. The batch method takes less time than the each method, and the two methods are similar in terms of memory reduction.
Dec 09, 2019 am 10:58 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
