PHP Classes

File: web/index-test.php

Recommend this page to a friend!
  Classes of Uldis Nelsons  >  YII2 Framework PHP Init  >  web/index-test.php  >  Download  
File: web/index-test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: YII2 Framework PHP Init
Create a project based on the YII2 from template
Author: By
Last change:
Date: 2 months ago
Size: 525 bytes
 

Contents

Class file image Download
<?php

// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
    die(
'You are not allowed to access this file.');
}

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');

require(
__DIR__ . '/../vendor/autoload.php');
require(
__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');

$config = require(__DIR__ . '/../tests/codeception/config/acceptance.php');

(new
yii\web\Application($config))->run();

For more information send a message to info at phpclasses dot org.