hi i have this script
<? session_start();
$username = $_SESSION['username'];
$site_name = $_SERVER['HTTP_HOST'];
$url_dir = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$url_this = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$upload_dir = "/upload_files/$username/";
$upload_url = "/upload_files/$username/";
$message ="";
//create upload_userfiles directory if not exist
//If it does not work, create on your own and change permission.
if (!is_dir("/upload_files/$username/")) {
mkdir ("upload_files/$username", 0777);
}
if ($_FILES['userfile']) {
$message = do_upload($upload_dir, $upload_url);
}
else {
$message = "Invalid userfile Specified.";
}
i get the follwoing error message:
Warning: mkdir() [function.mkdir]: File exists in /home/sites/site653/web/work/upload.php on line 17
Invalid userfile name Specified
i have an identical script in the main web folder and it works fine.... ? i dont understand thanks in advance 🙂