Issues with File Permision
Posted: Fri Jun 11, 2004 10:45 am
Hi guys...this is a bit of my code..to process uploads. everything works good..except..for some reason..the file lock the permission.. i cannot access it through ftp...even when i tried to change the chmod to 777..it give me "Permission Denied" error... the site is hosted by unix server..
so if anyone have any idea..or experienced this before..please help me..thanx guys..
so if anyone have any idea..or experienced this before..please help me..thanx guys..
Code: Select all
function updateImage($HTTP_POST_FILES, $originalImage){
$uploaddir = '../My Documents/My Pictures/images/brandsImage/';
if (isset($_FILESї'file']) and $_FILESї'file']ї'name'] <> ""){
$uploadfile = $uploaddir . $_FILESї'file']ї'name'];
if (move_uploaded_file($_FILESї'file']ї'tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded. ";
if ($originalImage <> "" and file_exists($uploaddir . $originalImage)){
unlink($uploaddir . $originalImage);
}
} else {
echo "Invalid file type";
}
} else {
echo "No image supplied";
}
}