Click to See Complete Forum and Search --> : file upload


Anon
09-19-2000, 04:35 AM
Hello All,
Though here was a program code on easy file upload I didn\'t get it.Please can anyone help me.
The problem any text or image got from the client has to be uploaded and copied to a private directory.I tried the Easy code also.There it has been specified that the path has to be given but not the file name.Should the file name be explicitily given or is it created by the upload command???
I feel the problem is at the form part.
Kindly help me.Though it is a repetitive question I would be happy if anyone can make it mere clear.
Thank You.

Anon
09-20-2000, 05:42 AM
The directory that the files are being uploaded need to be given full access i.e.
on Linux
chmod 777 directory

That way PHP can write to the directory.

Regards
Darren
http://www.php4hosting.com/ $
http://www.php4hosting.co.uk/ £
PHP/MySQL Hosting from under $5 a month

Anon
09-21-2000, 12:18 PM
Madam,
I am not sure if this is the solution to your problem. If not give more insight into the issue and the error message.
But a typical way to upload is to avoid copy commands, as you will require to create a directory with complete permissions, this is hazadous. But if you are looking at this, then you will need to specify the syntax as below:

copy($file_from_form, "path_to_dir".$file_from_form_name);
// please note that $file_from_form_name is set by php with the file name.

But as an advice, I always ftp the file to the secure ftp server with the following directory access level.
<FTP_ROOT>
<INCOMING> <OUTGOING>
rw- -w- -w- rw- r-- r--

I have CGI Php's running to move the scripts periodically from incoming to outgoing for downloads.

I hope this helped you.