当客户登录时,我想在他的 id 下创建所有文件夹。我这样做是这样的:
<?php
include('connect.php');
$aid = $_SESSION['application_id'];
$sql = "select * from ApplicationRegister where application_id= $aid" ;
echo $sql;
$result = mysql_query($sql) or die (mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo "<table width='65%' cellpadding='4' border='0'>";
echo "<tr><td> <h4> Company Name: </h4></td> <td>" . $row['CompanyName'] . "</td> </tr> ";
echo "<tr><td> <h4> Company E-mail: </h4></td> <td>" . $row['CompanyEmail'] . "</td> </tr>";
echo "<tr><td> <h4> Registration Type: </h4> </td> <td>". $row['RegistrationType'] . "</td></tr>";
echo "<tr><td> <h4> Plan: </h4> </td> <td>" . $row['ApplicationPlan'] . "</td></tr>";
echo "<tr><td> <h4> Registered Date: </h4> </td><td>" . $row['Createddate'] . "</td></tr>";
echo "</table>";
}
$file = $_SERVER['DOCUMENT_ROOT'];
echo $file;
mkdir("$file/opencart/images/$application_id/products/");
mkdir("$file/localhost/opencart/images/$application_id/category/");
mkdir("$file/localhost/opencart/$application_id/application/");
echo "directory created";
?>
我什至检查了文件夹权限。它都是读写的,但没有创建文件夹。请帮我弄清楚该怎么做。