is_upload_file problem
Posted: Thu Aug 15, 2002 9:16 am
Hi all,
I am trying to get a simple upload page to work and one of the problems I am having is checking to see if the file already exists.
Which doesn't seem to work - as it lets multiple uploads of the same file name. Do I need to specify the path to the uploads dir somewhere within this code (/usr/local/apache/htdocs/apcenter/uploads/)?
Or is this not really the best way to check for an existing file before uploading?
Thanks - Steve
I am trying to get a simple upload page to work and one of the problems I am having is checking to see if the file already exists.
Code: Select all
Currently using:
if (!is_uploaded_file($userfile))
{
$error="Upload Problem: possible file attack.";
echo "<font class=maintext>$error</font>";
exit;
}Or is this not really the best way to check for an existing file before uploading?
Thanks - Steve