current location:Home > Technical Articles > PHP Framework > YII

  • How to update data in yii
    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 4523 2020-02-17 11:41:38
  • Yii uses rules to get error information
    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 2561 2020-02-17 11:26:13
  • yii encrypted string garbled characters
    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 1857 2020-02-17 11:15:33
  • The difference between yii2 and ci
    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 4180 2020-02-17 10:35:53
  • Use php in yii2 to determine whether the image exists
    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 2047 2020-02-17 10:00:31
  • How to get the new data id in yii
    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 2785 2020-02-17 09:40:48
  • How to adaptively switch templates in yii2
    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 2437 2020-02-10 11:14:45
  • yii framework routing configuration
    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 1703 2020-02-06 18:19:19
  • How to reference adminlte to yii2
    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 2013 2020-02-04 09:01:21
  • How to catch yii2 exceptions
    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 3094 2020-02-03 17:00:03
  • What should I do if nginx does not support yii?
    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 2705 2020-02-03 10:25:27
  • How to use mutex yii
    How to use mutex yii
    "mutex" in Yii refers to the "Mutex component", which allows concurrent processes to execute each other to prevent "race conditions"; the syntax for using "mutex" is "if ($mutex->acquire($mutexName)) { } else {}".
    YII 3010 2020-02-03 10:19:08
  • How to connect Yii2 to PostgreSql
    How to connect Yii2 to PostgreSql
    This article introduces the method of connecting the Yii2 framework to PostgreSql. It has certain reference value. Now I share it with you. I hope it will be helpful to you!
    YII 3022 2020-02-02 21:12:47
  • The difference between yii and cms
    The difference between yii and cms
    CMS refers to content management system, which is usually a developed web application that can be used on the server; Yii is a framework for developing web applications, which can be used to develop CMS programs.
    YII 2952 2020-02-05 17:58:34
  • What should I do if the yii verification code does not come out?
    What should I do if the yii verification code does not come out?
    The solution to the yii verification code not coming out: first open the "CCaptchaAction.php" file; then delete the spaces in the text; then add "error_reporting(0);" at the top of the php file; finally add "ob_clean();" before the header output. That’s it.
    YII 2312 2020-02-01 14:42:43

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28