Commit 0e9bc727 authored by luhongguang's avatar luhongguang

update:cli 配置调整

parent 9369864e
...@@ -19,9 +19,9 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb" ...@@ -19,9 +19,9 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb"
[exception] [exception]
debug = false debug = false
exception.user.code = -1 exception.user.code = -1
exception.user.msg = "error" exception.user.msg = "用户未定义异常,研发正在赶来的路上..."
exception.sys.code = -1 exception.sys.code = -1
exception.sys.msg = "system error" exception.sys.msg = "系统未定义异常,研发正在赶来的路上..."
[prod : common : exception] [prod : common : exception]
......
...@@ -16,6 +16,8 @@ if (!substr(php_sapi_name(), 0, 3) == 'cli') { ...@@ -16,6 +16,8 @@ if (!substr(php_sapi_name(), 0, 3) == 'cli') {
} }
define('ROOT_PATH', realpath(__DIR__ . '/../')); define('ROOT_PATH', realpath(__DIR__ . '/../'));
define('APPLICATION_PATH', realpath(__DIR__ . '/../')); define('APPLICATION_PATH', realpath(__DIR__ . '/../'));
define('APP_START', microtime(true));
require APPLICATION_PATH . '/vendor/autoload.php'; require APPLICATION_PATH . '/vendor/autoload.php';
require APPLICATION_PATH . '/application/library/helper.php'; require APPLICATION_PATH . '/application/library/helper.php';
$application = new Yaf\Application(APPLICATION_PATH . "/conf/cli.ini"); $application = new Yaf\Application(APPLICATION_PATH . "/conf/cli.ini");
...@@ -31,6 +33,9 @@ if ($param) { ...@@ -31,6 +33,9 @@ if ($param) {
$param = convertUrlQuery($param); $param = convertUrlQuery($param);
} }
$_SERVER['SERVER_NAME'] = 'daemon.goods';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$application->bootstrap()->getDispatcher()->dispatch(new Yaf\Request\Simple("", $module, $controller, $method, $param)); $application->bootstrap()->getDispatcher()->dispatch(new Yaf\Request\Simple("", $module, $controller, $method, $param));
function convertUrlQuery($query) function convertUrlQuery($query)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment