rawurldecode

(PHP 4, PHP 5, PHP 7, PHP 8)

rawurldecode對(duì)已編碼的 URL 字符串進(jìn)行解碼

說(shuō)明

rawurldecode(string $str): string

返回字符串,此字符串中百分號(hào)(%)后跟兩位十六進(jìn)制數(shù)的序列都將被替換成原義字符。

參數(shù)

str

要解碼的 URL。

返回值

返回解碼后的 URL 字符串。

范例

示例 #1 rawurldecode() 示例

<?php

echo rawurldecode('foo%20bar%40baz'); // foo bar@baz

?>

注釋

注意:

rawurldecode() 不會(huì)把加號(hào)('+')解碼為空格,而 urldecode() 可以。

參見