Skip to content
This repository was archived by the owner on Jan 4, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ThinkPHP/Library/Think/App.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ class App
public static function init()
{
// 日志目录转换为绝对路径 默认情况下存储到公共模块下面
C('LOG_PATH', realpath(LOG_PATH) . '/Common/');
if (is_null(C('LOG_PATH'))) {
C('LOG_PATH', realpath(LOG_PATH) . '/Common/');
} else {
C('LOG_PATH', C('LOG_PATH') . '/Common/');
}

// 定义当前请求的系统常量
define('NOW_TIME', $_SERVER['REQUEST_TIME']);
Expand Down
2 changes: 1 addition & 1 deletion ThinkPHP/Library/Think/Dispatcher.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static function dispatch()
// 定义当前模块的模版缓存路径
C('CACHE_PATH', CACHE_PATH . MODULE_NAME . '/');
// 定义当前模块的日志目录
C('LOG_PATH', realpath(LOG_PATH) . '/' . MODULE_NAME . '/');
C('LOG_PATH', C('LOG_PATH') . '/' . MODULE_NAME . '/');

// 模块配置文件开始载入检测位
Hook::listen('module_check');
Expand Down
6 changes: 5 additions & 1 deletion ThinkPHP/Mode/Api/App.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public static function init()
}

// 日志目录转换为绝对路径
C('LOG_PATH', realpath(LOG_PATH) . '/');
if (is_null(C('LOG_PATH'))) {
C('LOG_PATH', realpath(LOG_PATH) . '/');
} else {
C('LOG_PATH', C('LOG_PATH') . '/');
}
// TMPL_EXCEPTION_FILE 改为绝对地址
C('TMPL_EXCEPTION_FILE', realpath(C('TMPL_EXCEPTION_FILE')));
return;
Expand Down
6 changes: 5 additions & 1 deletion ThinkPHP/Mode/Lite/App.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public static function init()
{

// 日志目录转换为绝对路径 默认情况下存储到公共模块下面
C('LOG_PATH', realpath(LOG_PATH) . '/Common/');
if (is_null(C('LOG_PATH'))) {
C('LOG_PATH', realpath(LOG_PATH) . '/Common/');
} else {
C('LOG_PATH', C('LOG_PATH') . '/Common/');
}

// 定义当前请求的系统常量
define('NOW_TIME', $_SERVER['REQUEST_TIME']);
Expand Down
2 changes: 1 addition & 1 deletion ThinkPHP/Mode/Lite/Dispatcher.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static function dispatch()
// 定义当前模块的模版缓存路径
C('CACHE_PATH', CACHE_PATH . MODULE_NAME . '/');
// 定义当前模块的日志目录
C('LOG_PATH', realpath(LOG_PATH) . '/' . MODULE_NAME . '/');
C('LOG_PATH', C('LOG_PATH') . '/' . MODULE_NAME . '/');

// 加载模块配置文件
if (is_file(MODULE_PATH . 'Conf/config' . CONF_EXT)) {
Expand Down