Afficher un message
Vieux 25/03/2008, 19h18   #3
bizt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problems uploading images with script

> I've seen this before - the file may or may not actually exist in the
> tmp folder. But even if file_exists() fails, it seems
> move_uploaded_file() still works.
>
> Try moving it to your own directory then check it out. If it isn't what
> you expect, delete it.


Hi, ive tried moving it using move_uploaded_file() but it still isnt
working. Below is the code im using:

if(isset($_REQUEST['submit_add'])) {

$srcPath = $_FILES['image']['tmp_name'];
$dstPath = $_SERVER['DOCUMENT_ROOT'].'/_testing/newfile.jpg';

if(move_uploaded_file($srcPath, $dstPath)) {
echo 'WHOO HOO!!!';
} else {
echo 'NNNO!';
}

}

Ive spoken with the guy who manages the servers (unfortunetely off
work today) and he mentioned something that there may be differences
between PHP4 and PHP5 for doing this sort of thing. Is that true?

Cheers

Burnsy

  Réponse avec citation
 
Page generated in 0,04488 seconds with 9 queries