mirror of
https://github.com/jcampbell1/simple-file-manager.git
synced 2025-02-20 22:00:04 +01:00
兼容window环境
windows环境运行提示403 Forbidden
This commit is contained in:
@@ -38,6 +38,7 @@ if($PASSWORD) {
|
|||||||
setlocale(LC_ALL,'en_US.UTF-8');
|
setlocale(LC_ALL,'en_US.UTF-8');
|
||||||
|
|
||||||
$tmp_dir = dirname($_SERVER['SCRIPT_FILENAME']);
|
$tmp_dir = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||||
|
if(DIRECTORY_SEPARATOR==='\\') $tmp_dir = str_replace('/',DIRECTORY_SEPARATOR,$tmp_dir);
|
||||||
$tmp = get_absolute_path($tmp_dir . '/' .$_REQUEST['file']);
|
$tmp = get_absolute_path($tmp_dir . '/' .$_REQUEST['file']);
|
||||||
|
|
||||||
if($tmp === false)
|
if($tmp === false)
|
||||||
|
|||||||
Reference in New Issue
Block a user