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_uploade d_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);
}
?>
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_uploade d_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);
}
?>
Comment