On Sat, July 9, 2005 1:39 am, Ahmed Abdel-Aliem said: > Hi > i have a problem with a code to upload files on server > here is the code > > $f =& $HTTP_POST_FILES['News_Pic']; Use $_FILES to stay current... > $dst_file_name = generateUniqueId(); > > $arr = split("\.",$f['name']); > > $f['name'] = $dst_file_name; > > $f['name'] .= ".".$arr[count($arr)-1]; > > $dest_dir = 'main/pictures'; > > $dest = $dest_dir . '/' .$f['name']; So, what happened to $dst_file_name? Far as I can tell, you've never used it... > $r = move_uploaded_file($f['tmp_name'], $dest); > $News_Pic = $f['name']; > chmod($dest, 777); Nooooooooooooooo! You should *NOT* be trying to make the files 777. And it should be 0777 anyway. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php