Top Questions

  • 5.11 Years

    • Category : Yii2
    • Location : Mohali
    • Posted On : Feb 4, 2019

    This is how to use Gii working on remote server for an yii2 advanced template.

    This is how to use Gii working on remote server for an yii2 advanced template.

    In the frontend config file. Example:

    (your folder)/frontend/config/main-local.php

    Add the following code:
    
    if (!YII_ENV_TEST) {
        // configuration adjustments for 'dev' environment
        $config['bootstrap'][] = 'debug';
        $config['modules']['debug'] = 'yii\debug\Module';
    
        $config['bootstrap'][] = 'gii';
        $config['modules']['gii']=[
          'class' =>  'yii\gii\Module',
          'allowedIPs' => ['<enter your id address>'],  // open https://www.dorcode.com/ip-locator-with-google-map link for your ip address
        ];
    }
    Then open (your folder)/frontend/gii

    In the Backend config file. Example:

    (your folder)/backend/config/main-local.php

    Add the following code:
    
    if (!YII_ENV_TEST) {
        // configuration adjustments for 'dev' environment
        $config['bootstrap'][] = 'debug';
        $config['modules']['debug'] = 'yii\debug\Module';
    
        $config['bootstrap'][] = 'gii';
        $config['modules']['gii']=[
          'class' =>  'yii\gii\Module',
          'allowedIPs' => ['<enter your id address>'],  // open https://www.dorcode.com/ip-locator-with-google-map link for your ip address 
        ];
    }
    
    Then open (your folder)/backend/gii

    Open https://www.dorcode.com/ip-locator-with-google-map click here for your ip address

Add Your Answer

When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.