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 Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to introduce css and js files into yii framework
- The way to introduce css and js files in the yii framework is to introduce them directly on the view page, for example [<=Html::cssFile('@web/css/index.css')?><?=Html::jsFile('@web /js/jquery.min.js')?>].
- YII 2131 2020-02-17 13:51:47
-
- How to switch multi-language packages in yii2
- How to switch multi-language packages in yii2: first configure the components; then create a message directory in the web directory to store the language configuration files; then modify the creation application code in web/index.php; finally write the controller to implement Just switch the language.
- YII 2696 2020-02-17 12:02:52
-
- yii2 Chinese garbled code
- The way to solve the Chinese garbled problem in yii2 is to configure the database, for example ['class' => 'yii\db\Connection','dsn' => 'mysql:host=127.0.0.1; dbname=ohmycto; charset=utf 】.
- YII 2628 2020-02-17 11:52:03
-
- How to generate hyperlinks in yii
- The method for yii to generate hyperlinks is to use yii's built-in URL generation tool urlManager, such as [\Yii::$app->urlManager->createAbsoluteUrl($params, $schema = null)].
- YII 1992 2020-02-17 11:42:49
-
- How to update data in yii
- Methods for updating data in yii: 1. Use the update(true, updated field) method to update data; 2. Use the updateAll() method to update multiple pieces of data; 3. Use find() to find data, and after changes, call the save() method Just save it.
- YII 4646 2020-02-17 11:41:38
-
- Yii uses rules to get error information
- Yii uses rules to obtain error information: first use the rules function in the model to return array type data; then use new myModel() in the controller to instantiate the relevant table model class; finally use the getErrors() method to obtain error information.
- YII 2667 2020-02-17 11:26:13
-
- yii encrypted string garbled characters
- The solution to garbled characters in yii encrypted strings: first use base64_decode($uid) to decode the encrypted data; then use \yii::$app->security->decryptByPassword() to decrypt the data to ensure that it is not garbled.
- YII 1965 2020-02-17 11:15:33
-
- The difference between yii2 and ci
- The differences between yii2 and ci are: 1. yii2 code is elegant and concise, and ci has a very large space for customization; 2. yii2 is very easy to expand, and ci needs to write extensions yourself; 3. yii2 has a relatively high learning curve, and ci has the characteristics of being easy to get started, etc. wait.
- YII 4293 2020-02-17 10:35:53
-
- Use php in yii2 to determine whether the image exists
- How to use PHP to determine the existence of an image in Yii2: 1. Use the file_exists() function, pass in the path of the image, and return true if it exists; 2. Use the file_get_contents() function, pass in the path of the image, and return the image content if it exists, etc. .
- YII 2312 2020-02-17 10:00:31
-
- How to get the new data id in yii
- The method for yii to obtain the newly added data ID: first use Yii::$app->request->post() to obtain the submitted data; then use new User() to instantiate the object; finally use the setAttributes() method and $model ->id can get the id value.
- YII 2884 2020-02-17 09:40:48
-
- How to adaptively switch templates in yii2
- The method for adaptively switching templates in yii2 is: 1. First create a behavior; 2. Then create a base class BaseController.php; 3. Create H5Views under frontend and place the H5 template file there.
- YII 2551 2020-02-10 11:14:45
-
- yii framework routing configuration
- Yii framework routing configuration method: 1. First, enable the rewrite module in the server configuration (httpd.conf); 2. Add the server configuration file [.htaccess] in the directory; 3. Then add the urlManager configuration item; 4. Finally restart Just the server.
- YII 1824 2020-02-06 18:19:19
-
- How to reference adminlte to yii2
- The method for adminlte to reference yii2: first download and install the yii2 framework; then create the user table in the database; then execute the command "composer require mdmsoft/yii2-admin "~2.0"" in the windows environment.
- YII 2144 2020-02-04 09:01:21
-
- How to catch yii2 exceptions
- The method of catching exceptions in yii2: first throw an exception in method a; then use the use keyword to import Exception; finally use the try{}catch(\Exception $e) statement to catch the exception.
- YII 3264 2020-02-03 17:00:03
-
- What should I do if nginx does not support yii?
- The solution to the problem that nginx does not support yii: first open the "nginx.config" configuration file; then add "server" to the file and change "root" to the directory where the "index.php" file is located; finally open the "web.php" file And set the access permission to "777".
- YII 2987 2020-02-03 10:25:27