修复install.php在Windows下的权限检测BUG

修复分组管理添加编辑时的BUG
pull/135/MERGE
Karson 2017-07-12 16:01:37 +08:00
parent 98060d5128
commit 0feaecce2d
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
return false; return false;
} }
$.ajax({ $.ajax({
url: "ajax/roletree", url: "auth/group/roletree",
type: 'post', type: 'post',
dataType: 'json', dataType: 'json',
data: {id: id, pid: $(this).val()}, data: {id: id, pid: $(this).val()},

View File

@ -18,14 +18,14 @@ define('APP_PATH', ROOT_PATH . 'application' . DS);
// 安装包目录 // 安装包目录
define('INSTALL_PATH', APP_PATH . 'admin' . DS . 'command' . DS . 'Install' . DS); define('INSTALL_PATH', APP_PATH . 'admin' . DS . 'command' . DS . 'Install' . DS);
//判断文件或目录是否有写的权限 // 判断文件或目录是否有写的权限
function is_really_writable($file) function is_really_writable($file)
{ {
if (DIRECTORY_SEPARATOR == '/' AND @ ini_get("safe_mode") == FALSE) if (DIRECTORY_SEPARATOR == '/' AND @ ini_get("safe_mode") == FALSE)
{ {
return is_writable($file); return is_writable($file);
} }
if (!is_file($file) OR ( $fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) if (!is_file($file) OR ( $fp = @fopen($file, "w+")) === FALSE)
{ {
return FALSE; return FALSE;
} }