Re: check if a file is included

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> but I would like to know if there is a neater, cleaner, sparkly way of doing
> this.

The way your doing it is fine. You could wrap it up in a custom function, eg:

// True means called directly.
function wasThisFileIncludedOrCalledDirectly ()
{
    return strstr($__SERVER["REQUEST_URI"], 'interceptor');
}

Or something like that.

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux