Re: Re: A little help needed - get_filename() and get_linenum()

From: Date: Wed, 04 Sep 2002 14:15:36 +0000
Subject: Re: Re: A little help needed - get_filename() and get_linenum()
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-87906@lists.php.net to get a copy of this message
Appologies :) That was a quick fix! heh Thanks for your help, > Hello! > > You probably did not see magic constants __FILE__ and __LINE__ in PHP > manual ? > > Check this: http://si.php.net/manual/en/language.constants.php > > Cheers, > Dejan > > "Dan Hardiker" <dhardiker@staff.firstcreative.net> wrote in message > > news:10119.193.237.249.44.1031146565.squirrel@adam.firstcreative.net... > | 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 > | } > | ?> > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php -- Dan Hardiker [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd

« previous php.dev (#87906) next »