Home >Backend Development >PHP Tutorial >php rawurlencode and rawurldecode tutorial_PHP tutorial

php rawurlencode and rawurldecode tutorial_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:01:111409browse

php rawurlencode and rawurldecode tutorial ​

rawurldecode
(PHP 4, PHP 5)

rawurldecode - Decode URL encoded string

Description
String rawurldecode (String $str)
Returns a string in which the two hexadecimal digits following the sequence of percent sign ( % ) signs are replaced with literal characters.

Parameters

str
Decode the URL.


Return value
Returns the decoded URL, as a string.

Example

Example #1 rawurldecode() example

rawurlencode
(PHP 4, PHP 5)

rawurlencode - URL encoding according to RFC 1738

Description
String rawurlencode (String $str)
Encode a specific string according to » RFC 1738.

Parameters

str
Encode the URL.


Return value
Returns all non-alphanumeric characters in a string except - _. is replaced with a percent sign ( % ) followed by two hexadecimal digits. This is the encoding description » RFC 1738 for protecting literal characters from being interpreted as special URL delimiters and protecting URLs from being mangled in transmissions with media conversion properties (such as some email systems).

Example

Example #1 includes a password for the FTP URL

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445455.htmlTechArticlephp rawurlencode and rawurldecode tutorial rawurldecode (PHP 4, PHP 5) rawurldecode - Decode URL encoded string description characters String rawurldecode (String $str) Returns a word...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn