Note Submitter: www.kigoobe.com
----
Checklist for a file upload using ftp_put()
1. Check the form enctype. I used multipart/form-data to
upload word, excel or jpegs using ftp_put()
2. Check the permission of your folder. Unless you have
PHPSuExec installed, you change permission of the
destination folder to 777
3. See the path of your destination, as that's what creates
the problem most of the time. Incase we use ftp_put() with
basename($fileName); ($fileName is any file name of your
choice + the valid extension for the file uploaded) then the
files are uploaded to /home/user/ folder.
So, in case you want to upload your files to a sub folder
called dynamicDocuments situated at the same level where
your index.php file is, you have to use the path as -
$destination_file =
'public_html/dynamicDocuments/'.basename($fileName);
HTH someone.
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|