1 Star 0 Fork 0

李铭昕/basic-phalcon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
李铭昕 提交于 2018-06-14 22:34 . 增加项目驱动引擎
#!/usr/bin/env php
<?php
use App\Core\DI;
define('ROOT_PATH', __DIR__);
define('APP_PATH', ROOT_PATH . '/app');
define('IS_CLI', true);
define('ENGINE', 'CLI');
/**
* Read vendor autoload
*/
if (file_exists(ROOT_PATH . "/vendor/autoload.php")) {
include ROOT_PATH . "/vendor/autoload.php";
}
/**
* Get config service for use in inline setup below
*/
$config = include APP_PATH . "/config/config.php";
/**
* Include Autoloader
*/
include APP_PATH . '/config/loader.php';
/** 设置时区 */
ini_set('date.timezone', $config->timezone);
/**
* Create a console application
*/
$di = (new DI($config))->getDI();
/** @var \Xin\Phalcon\Cli\XConsole $console */
$console = $di->getShared('xconsole');
/**
* Handle
*/
$console->handle($argv);
/**
* If configs is set to true, then we print a new line at the end of each execution
*
* If we dont print a new line,
* then the next command prompt will be placed directly on the left of the output
* and it is less readable.
*
* You can disable this behaviour if the output of your application needs to don't have a new line at end
*/
if (isset($config["printNewLine"]) && $config["printNewLine"]) {
echo PHP_EOL;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/limingxinleo/basic-phalcon.git
git@gitee.com:limingxinleo/basic-phalcon.git
limingxinleo
basic-phalcon
basic-phalcon
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385