自动生成的时候 检测应用目录是否可写

This commit is contained in:
thinkphp
2013-04-10 16:20:50 +08:00
parent 3d582c2cf3
commit 4f2835ad46

View File

@@ -18,7 +18,10 @@ class Create {
if(is_writable($lockfile)) { if(is_writable($lockfile)) {
return ; return ;
} else { } else {
touch($lockfile); if(!touch($lockfile)){
header('Content-Type:text/html; charset=utf-8');
exit('目录 [ '.APP_PATH.' ] 不可写!');
}
} }
foreach ($build as $module=>$list){ foreach ($build as $module=>$list){
if(!is_dir(APP_PATH.$module)) {// 创建模块目录 if(!is_dir(APP_PATH.$module)) {// 创建模块目录