|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
File download in PHP
hi can anyone lead me in the right direction in regards to users uploading their files(mp3 and jpeg) in PHP, tried loads of tutorials but no results!!! thanks
|
|
#2
|
|||
|
|||
|
there is a tutorial on this site called blogging from database, are u looking towards just uploading or using information to store the name of the upload into a database?
|
|
#3
|
|||
|
|||
|
thanks, yeah what im aiming for is that the user can upload an MP3 and an image onto the site i'm making, and then the MP3 can be downloaded from the site. finding it really difficult, more complicated then i expected. i'll check out that tutorial anyway, any more info would be appreciated....
|
|
#4
|
|||
|
|||
|
as soon as my server gets up ill help you out...but basically you will need to chmod your directory where u want to store files or put it in cgi-bin depending on your server
|
|
#5
|
|||
|
|||
|
There are a lot of pre-made scripts available at hotscripts.com, just download one of them and check the coding ( only if you want to make on on your own ) and learn from it.
|
|
#6
|
|||
|
|||
|
ok here we go
PHP Code:
this is for images but you can also change it to suit your needs. You can also change the name of the file being input to make sure you dont have duplicates, my advice would be if there is a login to change the name to the users id or name with the file extension so you can quickly follow up on it. PHP Code:
that will allow you to change the name to whatever you want. IF there are anymore questions just ask away, this is made for pictures, but like i said you can easily make it for everything EDIT: the form would look something like this PHP Code:
and obviously you need form tags around it |
|
#7
|
|||
|
|||
|
I have written some scripts to do exactly what you need. I posted them on this forum ages ago. The scripts allow you to upload files of any kind, the files are then stored in a specified directory, the information about the files are displayed in html tables, the files can be downloaded.
To be able to upload and download files there are scripts that store usernames and passwords for security. Only registered users can upload or download. Mail me if you want a copy of the scripts and I will find them for you.
__________________
SAFC |
|
#8
|
|||
|
|||
|
or just do a search of the forums im sure youll be able to find it
|
|
#9
|
|||
|
|||
|
Thanks a million for all your help guys
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > File download in PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|