Posts: 124
Name: Chris
Location: www.DecayedAds.com
|
Ok, I am able to pick a file, click upload and then it will seem to upload and this is what I get.
Upload: GetAttachment.jpg
Type: image/pjpeg
Size: 48.8486328125 Kb
Stored in: /tmp/phpynZdSh
I cant find the image on the FTP anywhere, where did it upload too?
Also, I want to make it upload to a certain directory inside the ftp, how do i do this?
This is what I have:
PHP Code:
<?php if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 20000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "File is either too large or invalid type."; } ?>
__________________
FREE LINK DIRECTORY! Please login or register to view this content. Registration is FREE
Last edited by GamingFreak; 11-03-2008 at 11:46 PM..
|