Hi
I need upload image to server and add to DB.
But in php.ini settings of my hosting provider UPLOAD_TMP_PATH = .
And this is troubles -> I can't give normal templorary file name:
Code (SAFE MODE):
move_uploaded_file($userfile, $path_upload.$userfile_name);
unset($image);
$f = fopen($path_upload.$userfile_name,"rb");
$image .= fread($f, filesize($userfile));
fclose($f);
$image = addslashes($upload);
unlink($path_upload.$userfile_name);
HAVE:
Warning: Unable to open './phpnZHOL2' for reading: No such file or directory in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 20
Warning: Unable to move './phpnZHOL2' to '/raid/domains/de/d/dy64/htdocs/www/dy64/uploads/Eng.gif' in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 20
Warning: Unable to access /raid/domains/de/d/dy64/htdocs/www/dy64/uploads/Eng.gif in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 23
Warning: fopen("/raid/domains/de/d/dy64/htdocs/www/dy64/uploads/Eng.gif","rb") - No such file or directory in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 23
Warning: Supplied argument is not a valid File-Handle resource in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 24
Warning: Supplied argument is not a valid File-Handle resource in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 25
Warning: Unlink failed (No such file or directory) in /raid/domains/de/d/dy64/htdocs/www/dy64/movie.dlg.php on line 28
P.S: But sometimes $userfile = /tmp/<name> -> in this case all rights
P.P.S: $userfile = str_replace("./", "/tmp/", $userfile) - NOT resolve probleme
HELP ME PLEASE