move_uploaded_file on localhost
- From: groupie <justforgroups@xxxxxxxxx>
- Date: Tue, 8 Apr 2008 13:21:18 -0700 (PDT)
Hi,
The code below is working - it returns the 'Received' message, however
I cannot find the uploaded file in the destination folder, or anywhere
else (other than source directory). I'm running PHP 5.2.5 on my PC
running Apache 2.0. Thanks.
<?php
$uploadDir = "/uploads";
$temp = $uploadDir;
if(is_uploaded_file($_FILES['upfile']['tmp_name']))
{
}
else
{
echo "the file was not uploaded correctly, try again";
exit(0);
}
if(move_uploaded_file($_FILES["upfile"]["tmp_name"], $uploadDir ))
print "Received {$_FILES['upfile']['name']} - its size is
{$_FILES['upfile']['size']}";
else
{
echo "error moving file from ".$_FILES["upfile"]["tmp_name"]." to
$uploadDir";
exit(0);
}
?>
.
- Follow-Ups:
- Re: move_uploaded_file on localhost
- From: Piotr
- Re: move_uploaded_file on localhost
- Prev by Date: Re: safe mode help
- Next by Date: Re: move_uploaded_file on localhost
- Previous by thread: Swatch Irony Chrono Watches Replica - Swatch Watches Cheap
- Next by thread: Re: move_uploaded_file on localhost
- Index(es):
Relevant Pages
|