win反斜杠处理

This commit is contained in:
gongfuxiang 2019-06-17 20:51:00 +08:00
parent 4064b48ca9
commit da1850047b

View File

@ -39,8 +39,8 @@ define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.':/
$request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; $request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
define('__MY_VIEW_URL__', substr(__MY_URL__, 0, -1).$request_url); define('__MY_VIEW_URL__', substr(__MY_URL__, 0, -1).$request_url);
// 系统根目录 // 系统根目录,强制转换win反斜杠
define('ROOT_PATH', dirname(__FILE__).DS); define('ROOT_PATH', str_replace('\\', DS, dirname(__FILE__)).DS);
// 系统根目录 去除public // 系统根目录 去除public
define('ROOT', str_replace('public'.DS, '', ROOT_PATH)); define('ROOT', str_replace('public'.DS, '', ROOT_PATH));