提交 4b25081f 编写于 作者: D devil_gong

小程序包生成,根目录前不参与创建,避免虚拟机没权限

上级 2a1dfce5
......@@ -45,14 +45,18 @@ class FileUtil
*/
public static function CreateDir($aim_url)
{
// 根目录前不参与,避免虚拟机没有权限
$aim_dir = ROOT;
$aim_url = str_replace($aim_dir, '', $aim_url);
// 空转成目录
$aim_url = str_replace('', '/', $aim_url);
$aim_dir = '';
$arr = explode('/', $aim_url);
$result = true;
foreach($arr as $str)
{
$aim_dir .= $str . '/';
if(!file_exists($aim_dir))
if($aim_dir != '/' && !is_dir($aim_dir))
{
$result = mkdir($aim_dir);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册