i try to make upload script for my website
each user can upload document , after that i want to create folder for each user then upload files in that
Code: Select all
$userdir = $user_id ;
$upload_dir = "uploads/{$userdir}/";
i make uploads folder in my wwwroot then i wana make folder same as each user id , then upload files in that folder
if (!is_dir("$upload_dir"))
{
mkdir($upload_dir ,0777);
chmod($upload_dir, 0777);
}
i using dotnetpanel as my website control panel
and IIS7 webserver
but this script cant make the folder and upload file
if (!is_writeable("$upload_dir")) {
die ("Error: The directory <b>($upload_dir)</b> is NOT writable, Please CHMOD (777)");
}please help me !