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

  • How to generate QR code in yii2
    How to generate QR code in yii2
    The method for yii2 to generate QR code is: 1. Add ["2amigos/yii2-qrcode-helper" : "*"] to the composer.json file of the corresponding project; 2. Call the QR code generation method in the controller; 3. Access the demo method.
    YII 3481 2020-02-17 16:25:35
  • Where is the entry file of the yii framework?
    Where is the entry file of the yii framework?
    The entry file of the yii framework is the index.php file in the web folder. Yii also has another entry file, which is the entry file of the yii2 command line, that is, the yii file in the top directory. If it is an advanced project, the entry file will There's more, but the basics are in one of these two forms.
    YII 4452 2020-02-17 16:10:36
  • How to update database data in yii
    How to update database data in yii
    The method for updating database data in yii is: [Customer::updateAll(['status' => 1], ['status'=> '2','uid'=>'1']); ].
    YII 3385 2020-02-17 15:52:29
  • How to implement page jump in yii
    How to implement page jump in yii
    The way Yii implements page jumps is to jump in different Controllers, such as [​$this->redirect(array('The controller to jump to/the action in the controller to jump to','parameters'=> 'value',,,,));】.
    YII 2650 2020-02-17 15:42:46
  • How does yii determine whether it is an ajax submission?
    How does yii determine whether it is an ajax submission?
    The method for Yii to determine whether it is an ajax submission is: [if (Yii::$app->request >isAjax) {// request is ajax request} else{//not ajax request}].
    YII 2444 2020-02-17 15:19:43
  • How to enable the debug bar in yii2
    How to enable the debug bar in yii2
    The method to enable the debugging bar in yii2 is: 1. First open the web.php file in the config directory; 2. Then find the allowedIPs option; 3. Finally, add your current IP address to the allowedIPs option.
    YII 3499 2020-02-17 15:06:42
  • Where to place public methods in Yii
    Where to place public methods in Yii
    Public methods in Yii can be placed in the [./common] directory, because the [./common] directory is a public resource directory, such as [namespace common\helps; class tools{public static function hello(){}].
    YII 2979 2020-02-17 14:54:16
  • Yii implementation does not call the layout layout file
    Yii implementation does not call the layout layout file
    The way Yii does not call the layout file is to set the layout attribute in the Controller to false, for example [SiteController extends Controller{public $layout=false;}].
    YII 2057 2020-02-17 14:40:55
  • How to introduce other templates into the content template page in yii2
    How to introduce other templates into the content template page in yii2
    The method for yii2 to introduce other templates into the content template page is: [<?php echo $this->render('@app/views/layouts/paginator.php',['pagination'=>$pagination]);?>] .
    YII 1975 2020-02-17 14:31:42
  • How to bind events in yii2.0
    How to bind events in yii2.0
    The method of binding events in yii is: binding through the on() method in yii\base\Component, such as [$this->on(self::TEST_EVENT,function(){}].
    YII 2335 2020-02-17 14:20:42
  • How to cancel URL verification in yii2
    How to cancel URL verification in yii2
    The method to cancel URL verification in yii2 is: 1. [public $onlyRegisteredRoute = true]; 2. Delete URLs that do not require verification from the registry; 3. Turn off SCRF verification in the controller.
    YII 1867 2020-02-17 14:02:51
  • How to introduce css and js files into yii framework
    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 1991 2020-02-17 13:51:47
  • How to switch multi-language packages in yii2
    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 2527 2020-02-17 12:02:52
  • yii2 Chinese garbled code
    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 2503 2020-02-17 11:52:03
  • How to generate hyperlinks in yii
    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 1866 2020-02-17 11:42:49

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