note 78329 added to function.substr
| From: | www dot kigoobe dot com at osu1 dot php dot net | Date: | Sun, 07 Oct 2007 09:10:43 +0000 |
| Subject: | note 78329 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131189@lists.php.net to get a copy of this message | ||
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. :)
----
Server IP: 69.147.83.197
Probable Submitter: 77.195.172.82
----
Manual Page -- http://www.php.net/manual/en/function.substr.php
Edit -- https://master.php.net/note/edit/78329
Del: integrated -- https://master.php.net/note/delete/78329/integrated
Del: useless -- https://master.php.net/note/delete/78329/useless
Del: bad code -- https://master.php.net/note/delete/78329/bad+code
Del: spam -- https://master.php.net/note/delete/78329/spam
Del: non-english -- https://master.php.net/note/delete/78329/non-english
Del: in docs -- https://master.php.net/note/delete/78329/in+docs
Del: other reasons-- https://master.php.net/note/delete/78329
Reject -- https://master.php.net/note/reject/78329
Search -- https://master.php.net/manage/user-notes.php