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

  • yii determines whether to submit in get mode
    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.
    YII 2382 2019-12-09 13:44:35
  • How to print sql statements in yii framework
    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.
    YII 2749 2019-12-09 13:40:33
  • How to sort yii2.0 tables
    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.
    YII 2394 2019-12-09 13:37:13
  • How to call extension class in php yii
    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',).
    YII 2830 2019-12-09 13:25:05
  • How to generate verification code in yii2
    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.
    YII 2971 2019-12-09 13:05:32
  • Is gii based on the yii framework?
    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.
    YII 2449 2019-12-09 11:49:20
  • What cache is used for yii2 user login?
    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.
    YII 2211 2019-12-09 11:39:05
  • How to format data in yii2
    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.
    YII 3091 2019-12-09 11:25:27
  • What does component mean in yii2?
    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.
    YII 3173 2019-12-09 11:15:49
  • What is the difference between yii2 batch and each
    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.
    YII 3964 2019-12-09 10:58:58
  • Can yii execute sql?
    Can yii execute sql?
    Yii can execute SQL by first creating a CDbCommand command object, and then using the execute() method, query() method or derived queryXXX() method in the CDbCommand object to execute the SQL statement.
    YII 1876 2019-12-09 10:42:34
  • How to use redis in yii2 project
    How to use redis in yii2 project
    If you want to use redis key-value storage well in Yii2, a PHP framework, first use composer to install the yii2-redis library, then configure the Connection class in the configuration file of your application, and then add the redis project to the component. .
    YII 3299 2019-12-09 10:28:22
  • How to open gii in yii framework
    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 2578 2019-12-09 09:53:55
  • What to do if a 500 error occurs in yii2.0
    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 2889 2019-12-09 09:33:28
  • How to customize yii components
    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 2452 2019-12-07 17:56:28

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