Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Does anyone know php?

OpenStudy (lyrae):

Yes. What's your question?

OpenStudy (anonymous):

i am building a website for users to store their files for free. i have the registration completed, but i can't figure out how to handle the file upload. i just put the site up for you to look at it if you'd like www.littleboxez.com I want the users files to be stored on the server so that they are the only ones who can access them, but i don't how to make any of it work. thanks for the help

OpenStudy (lyrae):

There are tons of information about this on the web, I've even seen pre-built frameworks and scripts. You probably want some kind of upploading script. When the user upploads a file you store information about where the file is located on the server together with a field indicating which user upploaded it. Finaly you provide a page where the users can see and download all their files. http://www.w3schools.com/php/php_file_upload.asp Protecting the files is the tricky part. One way to do it is to store the files outside of the webroot (public_html or htdocs etc.) and ouput the file through php (the downside of this is that it can be quite resource heavy). http://php.net/manual/en/function.readfile.php Some usefull links: http://www.uploadify.com/ http://www.albanx.com/ajaxuploader/ http://codular.com/javascript-ajax-file-upload-with-progress

OpenStudy (anonymous):

I have successfuly managed to allow users to upload files to the server but they are just in an uploads folder. How do i go about making the files accessible by only the user who uploaded them?

OpenStudy (lyrae):

"Protecting the files is the tricky part. One way to do it is to store the files outside of the webroot (public_html or htdocs etc.) and ouput the file through php (the downside of this is that it can be quite resource heavy). http://php.net/manual/en/function.readfile.php "

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!