|
Posted by Jonathan N. Little on 01/11/94 11:31
Toby Inkster wrote:
> brucie wrote:
>
>
>>i like mine bettera, no need for =1
>>http://moreshit.usenetshit.info/view-source-demo-thingy.shit
>
>
> Well, if you're after the ultra-compact:
>
> <?
> if ( isset($_GET['source']) )
> exit (highlight_file($_SERVER['SCRIPT_FILENAME'])&&0);
> ?>
>
> I wonder if anyone (other than brucie) can explain the &&0? :-)
>
I'll take a stab, highlight_file without a 2nd parameter prints rather
than returns a string. The && 0 inverts the boolean output so it exits
with '0' like errorlevel 0 on success and '1' on error.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|