index.php 860 B

12345678910111213141516171819202122232425262728293031
  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=tfb-database;dbname=hello_world',
  15. 'username' => 'benchmarkdbuser',
  16. 'password' => 'benchmarkdbpass',
  17. 'charset' => 'utf8',
  18. 'attributes' => [
  19. PDO::ATTR_PERSISTENT => true,
  20. ]
  21. ],
  22. 'urlManager' => [
  23. 'enablePrettyUrl' => true,
  24. ],
  25. ],
  26. ];
  27. (new yii\web\Application($config))->run();