Hi All,
Im looking at developing a couple of functions which could retrieve the
current line number, and filename where ever they are put. By file name, I
mean the actual file name, not the parent (eg: the file that included this
one)... very similar to what would be outputted in a syntax error or such.
A scenario where this would be useful would be in include files:
<?php
if ($_SERVER["SCRIPT_FILENAME"] == get_filename()) {
die("Dont talk to me!");
// or a header redirect, you get the jist
}
?>
It would also be useful for custom debug functions which dump to log files.
What Im after is a bit of help of where to start, any areas of PHP which I
can canabalise for hints / tips on doing this, examples - or even
information if this has been tried and failed / succeeded before.
also - would anyone else find this sort of functionality helpful, or is it
just me?
Thanks for any help,
--
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php