PHP Parse_url functions

Source: Internet
Author: User
Parse_url: resolves the URL and returns its component description mixed parse_url, which resolves a URL and returns an associative array containing any of the various components of the URL, and there are differences. This feature does not mean validating a given URL, it not only breaks the above part of it. Some URLs also accept that parse_url () will try to parse as correctly as possible. Parameter URL. Invalid character substitution _. Section specifies a php_url_scheme, php_url_host, Php_url_port, Php_url_user, Php_url_pass, Php_url_path, Php_url_query, or P Hp_url_fragment retrieves just one part of a specific URL as a string. The return value of the URL that is severely malformed, Parse_url () may return false and emit e_warning. Otherwise the associative array is returned, and its composition may be (at least one). If a partial parameter specifies that a string is returned instead of an array. Example: "Http://username:[email protected]/path?arg=value#anchor ';p rint_r (Parse_url ($url)), Echo Parse_url ($url, Php_url_path); output: Array ([scheme] =>http [host] =>hostname [user] =>username [pass] =>password [PATH] = >/path [query] =>arg=value [fragment] =>anchor) No related posts.

PHP Parse_url functions

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.