Authored by wuxiao

index.php

1 # yii console command 1 # yii console command
2 -/yii 2 +#/yii
3 3
4 # phpstorm project files 4 # phpstorm project files
5 .idea 5 .idea
1 -/index.php 1 +#/index.php
2 /index-test.php 2 /index-test.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  3 +defined('YII_ENV') or define('YII_ENV', 'prod');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
1 -/index.php 1 +#/index.php
2 /index-test.php 2 /index-test.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  3 +defined('YII_ENV') or define('YII_ENV', 'prod');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
  1 +#!/usr/bin/env php
  2 +<?php
  3 +/**
  4 + * Yii console bootstrap file.
  5 + *
  6 + * @link http://www.yiiframework.com/
  7 + * @copyright Copyright (c) 2008 Yii Software LLC
  8 + * @license http://www.yiiframework.com/license/
  9 + */
  10 +
  11 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  12 +defined('YII_ENV') or define('YII_ENV', 'prod');
  13 +
  14 +require(__DIR__ . '/vendor/autoload.php');
  15 +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
  16 +require(__DIR__ . '/common/config/bootstrap.php');
  17 +require(__DIR__ . '/console/config/bootstrap.php');
  18 +
  19 +$config = yii\helpers\ArrayHelper::merge(
  20 + require(__DIR__ . '/common/config/main.php'),
  21 + require(__DIR__ . '/common/config/main-local.php'),
  22 + require(__DIR__ . '/console/config/main.php'),
  23 + require(__DIR__ . '/console/config/main-local.php')
  24 +);
  25 +
  26 +$application = new yii\console\Application($config);
  27 +$exitCode = $application->run();
  28 +exit($exitCode);