PHP rawurlencode and rawurldecode Tutorial _php Tutorial

Source: Internet
Author: User
Tags rfc alphanumeric characters
PHP Rawurlencode and Rawurldecode Tutorials

Rawurldecode
(PHP 4, PHP 5)

Rawurldecode-decoding URL-encoded strings

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

Parameters

Str
Decodes the URL.


return value
Returns the decoded URL as a string.

Instance

Example # 1 Rawurldecode () example

Rawurlencode
(PHP 4, PHP 5)

Rawurlencode-URL encoding based on RFC 1738

Describe
String Rawurlencode (String $str)
Encode a specific string according to the» RFC 1738.

Parameters

Str
Encode the URL.


return value
Returns all non-alphanumeric characters in a string except for-_. is replaced with a percent sign (%) symbol followed by two hexadecimal digits. This is the encoding description» RFC 1738 for the protection of literal characters that are interpreted as special URL-delimited and protected URLs that are corrupted by the transmission media conversion and nature (such as some e-mail systems).

Instance

For example # 1 includes a password for the FTP URL

http://www.bkjia.com/PHPjc/445455.html www.bkjia.com true http://www.bkjia.com/PHPjc/445455.html techarticle php rawurlencode with rawurldecode tutorial Rawurldecode (PHP 4, PHP 5) rawurldecode-decode URL-encoded string description string Rawurldecode (String $str) Return a word ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.