Log in

View Full Version : Help Needed: File Upload to Server Script



Nals
02-13-2007, 05:28 AM
Hi
Can Someone tell me how to how to do a file upload page, what are the script needed. PHP , HTML etc..
Thanks
If this is not clear please see this site, http://www.motobit.com/util/upload/old-upload.asp

I need something like this. on my page.

Thank you :)

shachi
02-13-2007, 06:46 AM
This probably? http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=8&txtCodeId=927&txtForceRefresh=21320071482836900

Nals
02-13-2007, 07:06 AM
Hi Shachi Thanks for your link,
That is what I exactly want, but i m getting an error , maybe you can help me or someone else.
I did create a folder called upload, in my server Public_html and I have uploaded the upload.php file in that folder, then I can view the page, when I upload a file and submit, It wont upload.
do I have to change the path in that PHP file. or I have to change CHMOD on that folder for permisons?? Please Help me
I really appreciate.
Nals

Ohh this is the Error Page:

phpSimpleUpload Version 3.0
A simple script for uploading files!
Upload Information
File Name Size Type Upload
Warning: move_uploaded_file(upload.txt) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/xxxxx/public_html/upload/upload.php on line 95
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFc1sYC' to 'upload.txt' in /home/xxxxxx/public_html/upload/upload.php on line 95
upload.txt 0 bytes text/plain Failure

[ Upload More Files ]

shachi
02-13-2007, 07:37 AM
Nals: you need to grant access to that folder. if you have ssh(and you server is *nix) do:



chmod a+w upload/

Nals
02-13-2007, 09:38 AM
Shachi
Great !!!!!!!!!!!!!!!!!!!!! It works
Thanks for your help,

I will come back with more Questions ;)

shakyasujan
02-27-2007, 08:02 AM
Warning: move_uploaded_file(1.jpg): failed to open stream: Permission denied in /var/www/vhosts/none.com/httpdocs/demo/sujan/upload.php on line 95

Why this error comes while uploading file?
Can anyone help me?

Sujan

mburt
02-27-2007, 11:10 AM
The setting is in your php .ini file. It won't let you use that function.

thetestingsite
02-28-2007, 02:22 AM
or the permissions is set wrong on the directories or file itself.