When I upload a file this code:
if($userfile=="none")
{
echo "Problem: no file uploaded";
exit;
}
if($userfile_size==0)
{
echo "Problem: uploaded file is zero length";
exit;
}
if(!is_uploaded_file($userfile))
{
echo "Problem: possible file upload attack";
}
$upfile="..\public_ftp\incoming\images\".$userfile_name;
if(!move_uploaded_file($FILES["userfile"]["tmp_name"], $upfile.$Files["userfile"]["name"]))
{
echo "Problem: Could not move file into directory";
exit;
}
echo "File uploaded successfully<br><br>";
echo "Preview of uploaded file contents:<br><hr>";
echo "<img src=\"$upfile\">";
echo "<br><hr>";
?>
With this form:
<h1>Upload new news files</h1>
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Upload ths file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
I can display the file but cannot fide it on the server. If I check the address of the file I get something like this:
http://www.panhandleguitar.com/..%5Cpublic_ftp%5Cincoming%5Cimages%5Cbackgroud.jpg
Can anyone Help?