Page 1 of 1

Get Page Title/Name etc

Posted: Tue May 18, 2004 6:53 am
by fastfingertips
I want to store in my database the page name that generated the error, that's why can you tell me if is there any way to extract some info about the current page?

Posted: Tue May 18, 2004 7:44 am
by CoderGoblin
Although not specifically Page name/Title you could use __FILE__ which tells you the current filename. Normally I use basename(__FILE__) for debug purposes.

Regards

Posted: Tue May 18, 2004 8:03 am
by malcolmboston

Code: Select all

$_SERVER['PHP_SELF']
// will give you the currently executing script
i usually use this method