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

  • How to install yii framework?
    How to install yii framework?
    How to install the yii framework: 1. Install the Composer tool; 2. Run the composer create-project --prefer-dist yiisoft/yii2-app-basic basic command in a web-accessible folder to install it.
    YII 3410 2019-12-23 18:01:26
  • What is yii2.0?
    What is yii2.0?
    Yii is a high-performance PHP5 web application development framework, and yii2.0 is the 2.0 version of the Yii framework. Because the Yii2.0 version framework is completely rewritten, there are quite a few differences between the 1.1 and 2.0 versions.
    YII 3072 2019-12-23 17:49:32
  • What are the differences between yii1 and yii2?
    What are the differences 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 4565 2019-12-23 17:43:13
  • What is the folder assets in Yii?
    What is the folder assets in Yii?
    In Yii, assets are generally folders that store some style files (css), script files (js), picture files (images) and other content in the front and backend, so they can be used with Yii::app()->request-> Use baseUrl in conjunction with (get the project name).
    YII 6084 2019-12-23 17:36:22
  • How to use widgets of yii framework
    How to use widgets of yii framework
    The widgets of the yii framework are basically used in views. In the views, the yii\base\Widget::widget() method can be called to use the widgets. This method initializes the widget using the configuration array and returns the result of the widget being rendered.
    YII 2438 2019-12-23 16:34:32
  • How to solve Chinese garbled characters in yii framework
    How to solve Chinese garbled characters in yii framework
    ​Solution to Chinese garbled characters in the yii framework: 1. It may be caused by the incorrect encoding format when saving the yii file. This can be solved by changing the default encoding format of the editing tool to utf-8. 2. Specify the encoding format as utf-8 when connecting to the database in Yii.
    YII 3010 2019-12-23 16:02:08
  • Cookie settings are invalid in yii2
    Cookie settings are invalid in yii2
    The reason why the cookie setting in yii2 is invalid is that the [die] or [exit] statement is artificially added, resulting in the set [cookies] not being sent to the client. The solution is: when using the [add] method to insert the [cookie] item, the following code cannot have exit or end statements.
    YII 2892 2019-12-18 16:46:00
  • How to introduce CSS and JS files in Yii2 framework
    How to introduce CSS and JS files in Yii2 framework
    Use use at the top of the front view to call the code segment use yii\helpers\Html;; then in the following Html you can call <?=Html::jsFile('@web/js file path')?> like this.
    YII 2585 2019-12-18 14:59:48
  • How to determine whether the data table exists in the database in Yii
    How to determine whether the data table exists in the database in Yii
    The method to determine whether the data table exists in the database in Yii is: 1. First, you need to find out all the table names in the database and save the table names into a two-dimensional array; 2. Then further determine whether the table name exists in the database. in a dimensional array.
    YII 2970 2019-12-17 17:10:51
  • How to set yii2 not to use layout
    How to set yii2 not to use layout
    The method to set up yii2 not to use layout is: 1. Set the layout attribute member variable in the controller file to [false]; 2. Set the layout attribute member method in the controller file to [false]; 3. Close it in the view file. Just choose a layout.
    YII 3182 2019-12-17 17:01:15
  • The verification code image is not displayed in yii2
    The verification code image is not displayed in yii2
    The reasons and solutions for the verification code image not being displayed in yii2 are: 1. The BOM problem cannot be displayed, just delete the BOM in the PHP code involving the BOM in the file; 2. The output buffer is not cleared, before outputting the image, add [ob_clean] method can clear the output buffer.
    YII 3027 2019-12-17 16:45:51
  • How to import css and js files into yii2
    How to import css and js files into yii2
    The methods for importing css and js files in yii2 are: 1. You can directly import the files on the view page; 2. You can directly write native code to import the files; 3. There is no need to define methods in the resource package manager, you only need to add them to the view page Just import the file directly.
    YII 2890 2019-12-17 16:19:48
  • What are the sorting methods in yii
    What are the sorting methods in yii
    Yii uses the yii\data\Sort object to represent information about the sorting scheme. Sorting methods are: attributeOrders: gives the sorting direction currently set for each attribute. orders: Gives the sorting direction in terms of low-level columns.
    YII 3643 2019-12-17 16:18:54
  • How to transfer value when yii page jumps
    How to transfer value when yii page jumps
    Methods for passing values ​​in yii page jump: 1. Page jump in the same Controller: $this->render('view page',array('parameter'=>'value'));. 2. Use the $this->redirect method to pass values ​​when jumping to pages in different Controllers.
    YII 2363 2019-12-17 15:40:03
  • How to reference external files in Yii
    How to reference external files in Yii
    Methods to reference external files in Yii: 1. Introduce the external file path in Yii's ../config/main.php. 2. Use the "Yii::app()->basePath" method in the Yii code to reference external files.
    YII 2729 2019-12-17 15:32:17

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