如何从URL获取波斯/阿拉伯字符,然后显示
我已经对此进行了编码:
$url = "https://sitename.com/product-category/کتگوری";
$parsed = parse_url($url);
$path = $parsed['path'];
$path_parts = explode('/', $path);
$desired_output = $path_parts[2];
echo $desired_output;
现在返回的结果是: %d8%a2%D9%86
,
涉及>ککک陨正确地。
因此,我需要在波斯语/阿拉伯字符中正确显示$ desired_output
。
如何做?
I have coded this:
$url = "https://sitename.com/product-category/کتگوری";
$parsed = parse_url($url);
$path = $parsed['path'];
$path_parts = explode('/', $path);
$desired_output = $path_parts[2];
echo $desired_output;
Now the returned result is this: %d8%a2%d9%86
Which is referring to کتگوری
but does not show up correctly.
So I need to show the $desired_output
correctly in persian/arabic characters.
How to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)