1 Star 3 Fork 25

yg178/php-console

forked from inhere/php-console 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
boot.php 877 Bytes
一键复制 编辑 原始数据 按行查看 历史
inhere 提交于 2018-01-31 00:06 +08:00 . new: add error handle
<?php
/**
* phpunit --bootstrap tests/boot.php tests
*/
error_reporting(E_ALL | E_STRICT);
date_default_timezone_set('Asia/Shanghai');
spl_autoload_register(function($class)
{
$file = null;
if (0 === strpos($class,'Inhere\Console\Examples\\')) {
$path = str_replace('\\', '/', substr($class, strlen('Inhere\Console\Examples\\')));
$file = dirname(__DIR__) . "/examples/{$path}.php";
} elseif (0 === strpos($class,'Inhere\Console\Test\\')) {
$path = str_replace('\\', '/', substr($class, strlen('Inhere\Console\Test\\')));
$file = __DIR__ . "/{$path}.php";
} elseif (0 === strpos($class,'Inhere\Console\\')) {
$path = str_replace('\\', '/', substr($class, strlen('Inhere\Console\\')));
$file = dirname(__DIR__) . "/src/{$path}.php";
}
if ($file && is_file($file)) {
include $file;
}
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hwsyy/php-console.git
git@gitee.com:hwsyy/php-console.git
hwsyy
php-console
php-console
master

搜索帮助