Home >Backend Development >PHP Tutorial >php is similar to uriEncode in JS
Do not encode special characters in URI
$str = ';/?:@&=+$,#';str_replace(array('%3A','%2F','%40','%3F','%3D','%26','%23','% 25','%3B','%2B','%24','%2C'), array(':','/','@','?','=','&', '#','%',';','+','$',','),$uri);
The above introduces how PHP is similar to uriEncode in JS, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.