Posted by Kim Andrι Akerψ on 09/30/06 23:08
Steve Ray wrote:
> Guys
>
> I'm trying to write a function that will return that name of the page
> that you are currently viewing (and ultimately save this to a file)
>
> I want to then include this into a file that is included across the
> entirety of my site. The idea behind this is so that I can monitor
> which are the most popular pages on my site.
>
> ** I do not use a DB **
>
> I've found the PHP_SELF constant but this permanently returns (blank)
> when I display the contents of this onto the form
>
> Am I looking at the wrong info ?
>
> Ultimately can this be done ?
If you're looking for a *constant* named PHP_SELF, then you might be
barking up the wrong tree (since it's not a predefined constant).
If that's the case, try instead with $_SERVER["PHP_SELF"], or even the
constant __FILE__.
http://php.net/language.variables.predefined
http://php.net/language.constants.predefined
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
[Back to original message]
|