|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
PHP File Uploading Scripts
um, yeah.
ok, i'm an aspiring coder (read: some lazy guy who has a cheap webserver at home and doesn't like to carry floppy disks to school ), and i was looking around for some beginner level PHP scripts that would let me upload files through the HTTP protocal (err, that's redundant, isn't it...) to my server, from school.i've seen several ones built into forums (like the one right here), but i don't want to make a forum just to use the upload script . so, i was wondering if there are any standalone scripts that someone could point me too. doesn't need to do much, just let me upload files to one folder and then i'll be happy. if possible, i'd want password protection, but that's not the biggest deal to me.so, if anyone knows where to get any good scripts that work, please tell me, cause i don't like floppy disks.. ![]() and thanks in advance to anyone who can help. |
|
#2
|
|||||
|
|||||
|
i can pull out all the 'forum' stuff from the image gallery, and post it on here.
it used to be stand-a-lone It will just have the input box for the filename and then save it somewhere on your servers filesystem. I'll put the script up tonight. |
|
#3
|
||||
|
||||
|
hmm, i guess i could try that. as i said before, it just needs to be able to handle any type of file uploads. of course, i'd rather be able to block other scripts or exe's, or have password protection, but i'm sure i can find a way around that.
one other question. if i took a PHP script that offered password protection, and then put that to login to the file uplaod thing, would that work? i'm not really good with PHP, so i don't really know what i'm talking about . just a random idea that poped into my head. the only other idea i have for password protection is some crazy way through IIS (or apache, if i'm ever not lazy enough to go and make it work), because i think it's possible to do that, but once again, i'm not really sure.anyways, thanks again brandon. ![]() |
|
#4
|
|||||
|
|||||
|
it depends on what kind of security script you have.
the easiest way to do it (if you can & know how) is to set up .htaccess on apache. If you're going to only have one login, then we can do a real simple username/password thing with the script. I will make it so it only accepts file extensions that you specify. And has one login. |
|
#5
|
||||
|
||||
|
...or if you wanna take the cheap-n-easy dan way out....
dump this into a file and name it upload.html: PHP Code:
PHP Code:
if ($_POST['user'] != "ian" || $_POST['pw'] != "smells") for more info, go here and here Last edited by DanL : 10-09-2002 at 18:50. |
|
#6
|
|||||
|
|||||
|
yeah
thats basically what i was gonna do. dan saved me some time. mines a bit more cumbersome and probably confusing.. |
|
#7
|
|||||
|
|||||
|
almost like HTML but different.
|
|
#8
|
|||||
|
|||||
|
well, the top is html . ..
![]() |
|
#9
|
||||
|
||||
|
dan's thing works, but i have some problems with certain files. not a huge thing, just kinda annoying. now, i should probably learn PHP...
![]() EDIT yeah, i think the problem is with having the file size too small, but i made it much bigger (like, a GB), and it still failed to load a 2 MB file. i'm not sure if it's because it was an exe too, but it gave me errors based on file size. any ideas? Last edited by Ian W. : 10-09-2002 at 21:43. |
|
#10
|
|||||
|
|||||
|
Perl rules! Woo! *kicks php*
![]() |
|
#11
|
|||||
|
|||||
|
Quote:
copy/paste em, and we can help better |
|
#12
|
||||
|
||||
|
before it gave me error codes 1 and 2 for uploading files, now it just displays a blank screen and does nothing. i'm not sure why. maybe you guys have an idea?
|
|
#13
|
||||
|
||||
|
Probably cause the username/password don't match and it was a 5-minute coding job so there's nothing in the code to tell you that, so nothing happens. Try changing the first few lines of the PHP to this:
PHP Code:
|
|
#14
|
|||||
|
|||||
|
Quote:
p.s. thanks to the people that posted this script, i wanted to do the same thing, and it was really easy to intregrate into my current user/login system thanks |
|
#15
|
||||
|
||||
|
where is the php.ini file?
i saw it mentioned, but i couldn't find it anywhere. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File Sharing and Revision Tracking | Madison | FIRST-related Organizations | 14 | 04-06-2003 18:01 |
| php vs. perl | Jack | Website Design/Showcase | 20 | 29-12-2002 17:01 |
| Dashv2.ocx dependency file now available | archiver | 2000 | 0 | 23-06-2002 22:00 |
| What's better, PERL/cgi or PHP/my_sql? | mikefrei | Programming | 10 | 27-05-2002 22:50 |
| Improving PBASIC: Request for Comments | Greg Ross | Programming | 19 | 16-02-2002 22:14 |