|
-
May 16th, 2002, 11:57 PM
#1
Thread Starter
Addicted Member
Uploading in CGI/Perl
Hiyas,
I'm trying to look for some Perl/CGI code which can upload files via a form. I've checked cgi-resources.com, but a lot of the scripts there were for submitting files via a form to be emailed or something like that. All I'm looking for is simple code that can get a file (or files) from a form, check the file size(s), and save the file(s) to the server.
I've also found some code that does this but uses a Perl module (I think that's what they're called - I don't know much Perl yet), in a seperate file, but I'm after code which is kept entirely within the one file/script.
Can anyone help? I'd really appreciate if I could get some help with this!
Thanks.
-Git
-
May 17th, 2002, 11:02 AM
#2
Black Cat
The CGI module has these capabilities, and is part of the standard Perl distribution. Also, the CGI::Lite module handles file uploads.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
May 17th, 2002, 09:11 PM
#3
Thread Starter
Addicted Member
Thanks guys. I'm going to use CGI Lite actually, since it's fairly simple from what I've seen! What's the newest version, 2.0, right?
-
May 19th, 2002, 08:41 AM
#4
Thread Starter
Addicted Member
Alright, I've got CGI Lite 2.0 working with my scripts and it's fine. At the moment the code at the top of my scripts looks like this, and the CGI Lite module (Lite.pm) is in the same directory as the scripts.
Code:
use Lite;
$cgi = new CGI::Lite;
This works... However, I want to put the CGI Lite module into the next directory up a level (ie. this directory is a subdirectory of it). What do I need to change the code to so it looks for the module in the next directory up?
Thanks,
-Git
-
May 20th, 2002, 10:55 AM
#5
Black Cat
Try (or whatever the actual CGI::Lite file name is). Else you can manipulate the @INC array that contains paths to search for modules.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
May 20th, 2002, 11:59 PM
#6
Thread Starter
Addicted Member
Got it, thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|