Uploaded File Is Moved Successfully, But Really Isn't There

From: Date: Thu, 09 May 2002 00:34:47 +0000
Subject: Uploaded File Is Moved Successfully, But Really Isn't There
Groups: php.general 
Request: Send a blank email to php-general+get-96728@lists.php.net to get a copy of this message
I have a very simple form, it has a file box, and a submit button. I select a file, and press submit. There are no errors, and my script attempts to display the file (in this case an image) that was uploaded. After the file uploaded, I check the directory in which the file should've been moved too. It isn't there, even though PHP didn't give off any error messeges. <?php if(!is_dir("../../images/")) { echo "<font color=\"yellow\">Directory does not exist, creating...</font><br>\n"; @mkdir("../../images") or die("Directory couldn't be created!"); } if (move_uploaded_file($_FILES['image']['tmp_name'], "../../../images")) { echo "<img src=\"../../images/".$_FILES['image']['name']."\">Image</img>"; } $filename = $_FILES['image']['name']; $filepath = $_FILES['image']['dir']; ?> I seriously need some help. I'm completley stumped. Thanks ahead of time for any help.

« previous php.general (#96728) next »