如何转换像这样的字符串
%C4%BE%C5%A1%C4%8D%C5%A5%C5%BE-%C3%BD%C3%A1%C3%AD%C3%A9
到此:
ľščťž-ýáíé
使用PHP?
只需使用urldecode()函数,因为您有url encoded
字符串。
$encoded = '%C4%BE%C5%A1%C4%8D%C5%A5%C5%BE-%C3%BD%C3%A1%C3%AD%C3%A9';
$decoded = urldecode($encoded);
echo $decoded;
输出:
ľščťž-ýáíé
只需在php中使用urldecode()
函数。使用下方的代码
<?php
$string = "%C4%BE%C5%A1%C4%8D%C5%A5%C5%BE-%C3%BD%C3%A1%C3%AD%C3%A9";
echo urldecode($string); // Outputs ľščťž-ýáíé
?>
希望这能帮助您