Finding Page Path
Moderator: General Moderators
Finding Page Path
How would I go about getting the file and directory (or in other words full path) of the file that's being executing into a variable?
If you're talking about the page that's being executed right now it'd look like this.
I just recently asked a question similar to this and that code to find the full path, including the page and query string was shown to me by Feyd.
. He knows alot.
Code: Select all
$path = $_SERVERї'PHP_SELF'] . (!empty($_SERVERї'QUERY_STRING']) ? '?' . $_SERVERї'QUERY_STRING'] : '');