Web Hosting Talk







View Full Version : file upload


contrast
02-09-2002, 10:37 AM
Does anyone know of a simple upload script ??

I have php cgi mysql ssi etc.
Ive tried many , but i must be setting something wrong in the script, because i keep getting a server misconfig screen..
:eek: maybe someone could even set me one up......??:confused:
Thanks
Dave

priyadi
02-09-2002, 10:57 AM
You will get more help if you describe what you were trying to do, and specify any error messages or other useful information.

WiredON.net
02-09-2002, 01:27 PM
If you use perl you can use CGI.pm ....


my $IN = new CGI;
my $file = $IN->param('file');

open F, "/path/to/new/file" or die $!;
while (<$file>) {
print F;
}
close F;


Obviously that is very basic and you'd need to use regex to check for bad extensions and may also want to set a max file size limit.

Ectoman
02-09-2002, 01:51 PM
I was looking for the same thing last night and came across these PHP scripts: http://www.zachwhite.com/

contrast
02-09-2002, 01:53 PM
That means nothing to me WiredON.
Pryadi... I've got a school re-union site, and i want a simple script just so people can upload a past photo of themselves so i can put it in a web photo album.
I dont want the email cluttering thats all.

Ive tried a few, matts scripts etc, but i must be missing something in the script. All i need is a script to guide a simple browse button to. Sounds simple !!!

Appreciate the help.
Dave
:confused:

jimb
02-09-2002, 03:35 PM
I have an old copy of WebHome Free, it is a very simple GeoCities like script, that allows people to automatically sign up, then be able to get a directory like: yourdomain.com/user

Each user gets a little upload area and set amount of webspace.

Check it out, Ive attached it!


Jim

contrast
02-09-2002, 03:48 PM
Ive used the script off the link ectoman posted....

Very simple
Thanks:D

MGCJerry
02-10-2002, 08:05 AM
I've used WebHome free. Its a neat little script, you just need to be careful setting up the directories. As a matter of fact, I'm going to use it on my next site. Its not 100% customizable, but it works.

SI-Chris
02-10-2002, 08:37 AM
Originally posted by contrast
Ive tried a few, matts scripts etc, but i must be missing something in the script. All i need is a script to guide a simple browse button to. Sounds simple !!!
You have to make sure the server is set up to allow file uploads. Many are not. If the server is not set up to allow file uploads, it doesn't matter what script you're trying to use.