Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,462 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,358 people online right now. Registration is fast and FREE... Join Now!




php uploader/downloader

 
Reply to this topicStart new topic

php uploader/downloader

jcomputer
post 22 Apr, 2005 - 01:47 PM
Post #1


New D.I.C Head

*
Joined: 22 Apr, 2005
Posts: 8

Hi, i want to create a script that takes the uploaded file from a html form and uploads the file onto the server and displays it for download. It is going to be a zip file being uploaded.

umm if you need more information let me know
thank you
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 22 Apr, 2005 - 02:06 PM
Post #2


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


http://www.phpfreaks.com/tutorials/36/0.php

Just change this:
CODE
if ($_FILES['imagefile']['type'] == "image/gif"){


To this:
CODE
if ($_FILES['imagefile']['type'] == "application/zip"){


Let us know if you have any other problems with the code or need it to do something else!
User is offlineProfile CardPM

Go to the top of the page

jcomputer
post 22 Apr, 2005 - 08:40 PM
Post #3


New D.I.C Head

*
Joined: 22 Apr, 2005
Posts: 8

Sorry i am still new to php and i cant seem to get it to work.....now i put all that code in the php file or is the form in an html file and the rest is in a php file.

I have tried to put it all in an php file and the echo part isnt working it does not put any text on the page.
User is offlineProfile CardPM

Go to the top of the page

DanceInstructor
post 22 Apr, 2005 - 10:00 PM
Post #4


New D.I.C Head

Group Icon
Joined: 18 Mar, 2005
Posts: 41



Dream Kudos: 25
My Contributions


Sounds like you may have a parse error. If the php.ini is setup to show no errors you just get a blank page if there are parse errors. If you have access to your php.ini then try setting:

error_reporting = E_ALL

display_errors = on

Just use those settings for debugging though, not for a production site.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:09PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month