current location:Home > Technical Articles > PHP Framework > YII
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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.
- YII 2700 2019-12-09 09:53:55
-
- 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.
- YII 3005 2019-12-09 09:33:28
-
- 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.
- YII 2596 2019-12-07 17:56:28
-
- 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.
- YII 4203 2019-12-07 16:28:59
-
- 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.
- YII 2453 2019-12-07 16:21:15
-
- 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.
- YII 2546 2019-12-07 16:08:55
-
- 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.
- YII 2657 2019-12-07 16:01:21
-
- 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.
- YII 3766 2019-12-07 15:52:49
-
- 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.
- YII 2729 2019-12-07 15:33:15
-
- 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.
- YII 2821 2019-12-07 14:44:21
-
- 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.
- YII 15634 2019-12-07 11:48:51
-
- 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.
- YII 3281 2019-12-07 11:17:16
-
- 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.
- YII 5984 2019-12-07 11:04:59
-
- 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',".
- YII 2981 2019-12-07 11:02:01
-
- How to set the default access home page in yii
- How to set the default homepage for yii: Add: "'defaultRoute'=>'login/index' (controller/method)" in config->main.php to change the default homepage.
- YII 4275 2019-12-07 10:52:18