note 101639 deleted from function.file-get-contents by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:38:06 +0000 |
| Subject: | note 101639 deleted from function.file-get-contents by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215233@lists.php.net to get a copy of this message | ||
Note Submitter: contact at webapp dot fr
----
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.