Well that was embarrassing. I guess [CTRL]+[ENTER] sends mail in Outlook!
Let's try that again:

Okay, I think this is an easy thing but I can't figure it out:

I have a script that will be uploading (up to) 4 files:
$file1
$file2
$file3
$file4

Each $file variable has associated $original_name, $filesize, and $filename
variables. Each file:

$original_name = $HTTP_POST_FILES['userfile1']['name'];

that gets uploaded needs to 1) have the filename modified:

$filename1 = ereg_replace("[^a-z0-9._]", "",
             ereg_replace (" ", "_",
             ereg_replace("%20", "_",
             strtolower($orig_name))));

2) the extension compared to a list of 'forbidden' extensions,
3) the filename compared to filenames already in existence in the upload
directory,
and 4) uploaded.

Can I do this without writing separate filename, extension, existing, and
uploading scripts? Can someone point me in the right direction here?

Thanks,
Jason Soza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to