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

Reply via email to