Advertisement
voothi

Untitled

Feb 21st, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. //G:\vm\app\web\index.php
  2. <?php
  3.  
  4. // comment out the following two lines when deployed to production
  5. defined('YII_DEBUG') or define('YII_DEBUG', true);
  6. defined('YII_ENV') or define('YII_ENV', 'dev');
  7.  
  8. require __DIR__ . '/../vendor/autoload.php';
  9. require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
  10.  
  11. $config = require __DIR__ . '/../config/web.php';
  12.  
  13. (new yii\web\Application($config))->run();
  14.  
  15.  
  16. //G:\vm\app\config\web.php
  17. if (YII_ENV_DEV) {
  18.     // configuration adjustments for 'dev' environment
  19.     $config['bootstrap'][] = 'debug';
  20.     $config['modules']['debug'] = [
  21.         'class' => 'yii\debug\Module',
  22.         // uncomment the following to add your IP if you are not connecting from localhost.
  23.         'allowedIPs' => ['*'],
  24.     ];
  25.  
  26.     $config['bootstrap'][] = 'gii';
  27.     $config['modules']['gii'] = [
  28.         'class' => 'yii\gii\Module',
  29.         // uncomment the following to add your IP if you are not connecting from localhost.
  30.         'allowedIPs' => ['*'],
  31.     ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement