Results 1 to 3 of 3
Thread: Knowing current line number...
Nov 29, 2005, 14:03 #1
Knowing current line number...
Can you tell me how can I know the exact line number where some kind of function is executed?
And also $_SERVER['HTTP_REFERER'] shows the url from where the file is executed but not the file.
For example if the file name is test.php which resides on http://localhost/scripts/
HTTP_REFERER shows only the http://localhost/scripts/ but not http://localhost/scripts/test.php
Last edited by suro; Nov 29, 2005 at 14:40.
Nov 29, 2005, 15:19 #2
for the line # use __LINE__
and HTTP_REFERER doesn't show the executing script, it show the previous page...
for the current executing script use $_SERVER['SCRIPT_FILENAME'] or
$url = 'http://' . $_SERVER['SCRIPT_FILENAME'] . $_SERVER['SCRIPT_FILENAME'];
Nov 29, 2005, 15:38 #3
Cool, exactly what I wanted, Thanks.