upload file problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
i have a problem with a code to upload files on server
here is the code 

$f =& $HTTP_POST_FILES['News_Pic'];

$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'];

$r = move_uploaded_file($f['tmp_name'], $dest);

$News_Pic = $f['name'];
chmod($dest, 777);

after uploading a file i check the folder and i find nothing uploaded
and when i check the MySQL Table for the filed of the name of the
picture i find this
ef26fc32a2855a4edb6ef389b8b621af.
it should be that random number followed by the extension, for example :
ef26fc32a2855a4edb6ef389b8b621af.jpg
but this deosn't happen and the file is not uploaded
can anyone help me with this plz ?
-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux