Re: Subject: Uploads Question with mySQL
| From: | Johan Brouwers | Date: | Sat, 19 Apr 2003 12:30:56 +0000 |
| Subject: | Re: Subject: Uploads Question with mySQL | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19498@lists.php.net to get a copy of this message | ||
Hi,
What goes wrong if you receive the message:
permission denied...
when you use copy($source,$destination) to store the uploaded file?
Johan
Neil Smith <neil@fresh-toast.uklinux.net> schreef in berichtnieuws
5.2.0.9.0.20030413150504.00a86388@mail.uklinux.net...
> Glad you chose to put the AVI into a directory not into BLOBs on the
> database !!
>
> What have you tried at present, and how big do you expect the uploaded
> files to be ? I would personally suggest you get users to upload .wmv or
> .rm rather than uncompressed AVI , to save on both upload and download
time
> for users (assuming you want the AVIs to be visible to other users than
> yourself). The encoding tools are free and simple to use.
>
> This will also limit certain problems becoming apparent, such as script
> timeouts (normally set at 30 seconds - can be changed), and
> upload_max_filesize restrictions (normally 2-10 meg, can be changed).
>
> 10 Meg is still a lot of data - even on ADSL many people only get 128kbps
> upload speed, so you're looking practically at 10-12KB per sec, therefore
> 10 Meg = 15-20 mins upload time. Compress those files by factor of 10-20
> say for windows media or real player and you're in more reasonable
> territory 1-2 mins on DSL, and about 10-20 on modems.
>
> Regarding file uploads, the parameters are stored in the $_FILES variable.
> Don't forget to set a form method="post" and
> enctype="multipart/form-data"
> to send files to the server.
>
> You can find out some interesting things by interrogating the $_FILES
array
> such as :
>
> $_FILES["video"]["tmp_name"] // Temp name as stored by the web server
> $_FILES["video"]["type"] // Mime type of the uploaded file eg
video/avi
> $_FILES["video"]["name"] // Actual filename entered on the file
> upload form
> $_FILES["video"]["size"] // Size in bytes, of the attempted upload
>
> Hope that helps - Regards,
>
> Neil Smith.
>
> At 03:33 13/04/2003 +0000, you wrote:
> >Now I can get all those details in to the mySQL database fine, what I
want
> >to do is
> >have the user upload a short .avi file (under 10mb) with those details
and
> >to have them
> >stored in the folder d:\movies on the server. There will also be a
preview
> >version of each
> >.avi at about 30secs long that will need to be uploaded to the same
> >directory.
> >
> >Once the movie is uploaded I need to have the directory and file name
stored
> >in the mysql database
> >under preview and fullmov.
> >
> >Any help?
> >
> >Thanks
> >
> >- inpho -
>