Hello,
I am uploading a file to my server, and was wondering if anyone could let me know how to include a couple types of files. I located this general peice of code from the FAQ, but cannot seem to get the other file type right. Basically, I want the user to be able to upload text files (.txt), Word files, and PDF's. The code I have is below:
unless ($type =~ /text\/[html|plain]/i)
{
&showError("Dangerous file type of $type.<BR>UPLOAD ABORTED.");
}
Thank you for your time and effort guys.
Joe Barkawi
Software Engineer
Infinite Tiers, Inc.
I am uploading a file to my server, and was wondering if anyone could let me know how to include a couple types of files. I located this general peice of code from the FAQ, but cannot seem to get the other file type right. Basically, I want the user to be able to upload text files (.txt), Word files, and PDF's. The code I have is below:
unless ($type =~ /text\/[html|plain]/i)
{
&showError("Dangerous file type of $type.<BR>UPLOAD ABORTED.");
}
Thank you for your time and effort guys.
Joe Barkawi
Software Engineer
Infinite Tiers, Inc.