note 68668 added to function.urlencode

From: Date: Sun, 06 Aug 2006 09:09:57 +0000
Subject: note 68668 added to function.urlencode
Groups: php.notes 
Request: Send a blank email to php-notes+get-115580@lists.php.net to get a copy of this message
I think this was mentioned earlier but it was confusing.. But I had some problems with the urlencode eating my '/' so I did a simple str_replace like the following: $url = urlencode($img); $img2 = "$url"; $img2 = str_replace('%2F54', '/', $img2); $img2 = str_replace('+' , '%20' , $img2); You don't need to replace the '+' but I just feel comfortable with my %20, although it may present a problem if whatever you're using the str_replace for has a '+' in it where it shouldn't be. But that fixed my problem.. all the other encodes like htmlentities and rawurlencode just ate my /'s ---- Server IP: 216.194.113.175 Probable Submitter: 67.186.192.197 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.urlencode.php Edit -- https://master.php.net/note/edit/68668 Del: integrated -- https://master.php.net/note/delete/68668/integrated Del: useless -- https://master.php.net/note/delete/68668/useless Del: bad code -- https://master.php.net/note/delete/68668/bad+code Del: spam -- https://master.php.net/note/delete/68668/spam Del: non-english -- https://master.php.net/note/delete/68668/non-english Del: in docs -- https://master.php.net/note/delete/68668/in+docs Del: other reasons-- https://master.php.net/note/delete/68668 Reject -- https://master.php.net/note/reject/68668 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115580) next »