index.php 764 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // comment out the following two lines when deployed to production
  3. //defined('YII_DEBUG') or define('YII_DEBUG', false);
  4. //defined('YII_ENV') or define('YII_ENV', 'prod');
  5. //error_reporting(E_ALL);
  6. //ini_set('display_errors','on');
  7. require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
  8. $config = [
  9. 'id' => 'basic',
  10. 'basePath' => __DIR__,
  11. 'components' => [
  12. 'db' => [
  13. 'class' => 'yii\db\Connection',
  14. 'dsn' => 'mysql:host=127.0.0.1;dbname=hello_world',
  15. 'username' => 'benchmarkdbuser',
  16. 'password' => 'benchmarkdbpass',
  17. 'charset' => 'utf8',
  18. ],
  19. 'urlManager' => [
  20. 'enablePrettyUrl' => true,
  21. ],
  22. ],
  23. ];
  24. (new yii\web\Application($config))->run();