note 101639 added to function.file-get-contents
| From: | contact at webapp dot fr | Date: | Fri, 31 Dec 2010 11:57:23 +0000 |
| Subject: | note 101639 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175367@lists.php.net to get a copy of this message | ||
When using a URI with a login / password (HTTP or FTP, for an example), you may need to urlencode
the password if it contains special characters.
Do not urlencode the whole URI, just the password.
Don't do :
urlencode('ftp://login:mdp%?special@host/dir/file')
Do :
'ftp://login:' . urlencode('mdp%?special') .
'@host/dir/file';
Might seem obvious, but is worth noting.
----
Server IP: 69.147.83.197
Probable Submitter: 88.173.48.140
----
Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php
Edit -- https://master.php.net/note/edit/101639
Del: integrated -- https://master.php.net/note/delete/101639/integrated
Del: useless -- https://master.php.net/note/delete/101639/useless
Del: bad code -- https://master.php.net/note/delete/101639/bad+code
Del: spam -- https://master.php.net/note/delete/101639/spam
Del: non-english -- https://master.php.net/note/delete/101639/non-english
Del: in docs -- https://master.php.net/note/delete/101639/in+docs
Del: other reasons-- https://master.php.net/note/delete/101639
Reject -- https://master.php.net/note/reject/101639
Search -- https://master.php.net/manage/user-notes.php