There is no built-in functionality to get title of the page, however, you can use the HTML Simple DOM to read the contents of ') It will give you entire url including query string vars. Note that $_SERVER data is ignored for this request. However if all the URI's under is mapped to, then, for example, will return /index.php like $_SERVER. So when the $_SERVER is /index.php/big/directory/ then $_SERVER will be /index.php/big/directory/. However, unlike $_SERVER, it provides additional path information like $_SERVER when the actual php file is present in the path. This is the filename of the currently executing script, relative to the document root. So if the $_SERVER is /index.php/big/directory/ then too the $_SERVER will be same - /index.php. It is irrespective of the actual URI ( $_SERVER) used to access the site.Īs it returns the actual script name, it fails provide additional path information that may be present. Here are few super global variables for getting url info: $_SERVER
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |