How to Find the Current URL with PHP
The full URL to a page comes in three parts: The domain name, the path to the file then the filename, and the query string. For example, take the URL http://www.example.com/ex ample/page.php?name=Bob: 1. The domain name: www.example.com; 2. The path to the page: /example/page.php; 3. The query string: name=Bob So how do you find it all out in your own PHP scripts? This guide will tell you how access each of these elements by using the $_SERVER superglobal array which is available at all times within your PHP scripts.
Visit publisher site: How to Find the Current URL with PHPListing Details
- Filed in:
-
Scripts / PHP / Tutorials & Tips / Miscellaneous
- Submitted on:
- Last Updated:
- Dec 10, 2006
- Publisher:
- Sven Vdhrison Other listings by this publisher
License & Pricing Information
LICENSE #1
- License Type:
- Other
- Price:
- $0.00 USD
- Additional Info:
User Reviews
Be the first to review this listing!Not yet reviewed by any member.... You can be the FIRST one to write a review for How to Find the Current URL with PHP