0
此代码在父目录中很好地运行。但是,当我在子文件夹中运行它时,对应于0777的行上存在错误。此数字是文件权限。这是否意味着它没有写入子文件夹的权限?如何在子文件夹中创建新目录?
<?php
$thisdir = getcwd();
$new_dir = '145';
if(
mkdir(
$thisdir .
"/upload/" .
$new_dir,
0777))
// creates a subfolder called "upload" and a new file called "145"
{
echo "Directory has been created successfully...";
}
else
{
echo "Failed to create directory...";
}
?>