Re: File Uploads Help!!! --Forgot
| From: | Jason Todd Slack-Moehrle | Date: | Fri, 05 Dec 2008 22:13:40 +0000 |
| Subject: | Re: File Uploads Help!!! --Forgot | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284205@lists.php.net to get a copy of this message | ||
Here is the output I am printing:
'tempUploads/1425182872.xlsUploaded The File.'
What is the issue?
-Jason
On Dec 5, 2008, at 2:11 PM, Jason Todd Slack-Moehrle wrote:
Hi All, I am uploading a file and it says it worked, but I dont see it in the directory Here is my code so far: $allowed_ext = array('csv','xls'); $ext = end(explode('.',$_FILES['uploadedfile']['name'])); $ran2 = rand()."."; $target = "tempUploads/"; $target = $target . $ran2.$ext; if($_FILES['uploadedfile']['size'] > 2000000){ $message = 'File over 2MB'; echo $message; exit; } if($message == NULL && !in_array($ext,$allowed_ext)){ $message = 'File extension not allowed'.' extension is:'.$ext; echo $message; exit; } if($message == NULL) { if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target)) { $message = "Uploaded The File."; echo $message; // upload was successful, now lets work with it include '_functions.inc'; // Utility Functions include '_fileHeaders.inc'; // CSV File Headers that we expect, in the proper order include '_fileParse.inc'; // CSV File Parsing } else { $message = "Sorry, there was a problem uploading your file."; echo $message; } } How can I verify it is there? I ftp in and I dont see it. -Jason --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php