On Tue, Sep 16, 2008 at 3:09 AM, ANR Daemon <[EMAIL PROTECTED]> wrote:
> Greetings, Jochem Maas.
> In reply to Your message dated Tuesday, September 16, 2008, 3:38:44,
>
> > ANR Daemon schreef:
> >> Greetings, Jochem Maas.
> >> In reply to Your message dated Friday, September 12, 2008, 17:05:58,
>
On Sat, Sep 13, 2008 at 2:16 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>> Please stop top-posting.
>
> Lest you be smitten with a vengeance reserved only for top-posters. A
> nasty one. :-)
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
> http://www.phpguru.org/
> Please stop top-posting.
Lest you be smitten with a vengeance reserved only for top-posters. A
nasty one. :-)
--
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://
On Fri, Sep 12, 2008 at 7:41 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
> Could you not check one of the variables in the $_SERVER array to
> determine if the script called by the browser is the current file?
>
> -- Forwarded message --
> To: clive <[EMAIL PROTECTED]>
>> 2. incl
On Fri, Sep 12, 2008 at 8:44 AM, clive <[EMAIL PROTECTED]> wrote:
> I have a file called interceptor.php, which I would like to make use of in
> two ways
>
> 1. either call it directly from the browser or
> 2. included from another file
>
> I know I could use something like this to see if it was c
At 2:44 PM +0200 9/12/08, clive wrote:
I have a file called interceptor.php, which I would like to make
use of in two ways
1. either call it directly from the browser or
2. included from another file
I know I could use something like this to see if it was called via a
url like http://www.sit
clive schreef:
actually $_SERVER[script_name] is probably better if not being used from
a webserver.
you didn't mention wanting to use the cmdline.
untested code follows:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
actually $_SERVER[script_name] is probably better if not being used from
a webserver.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> 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"], 'interc
I have a file called interceptor.php, which I would like to make use of
in two ways
1. either call it directly from the browser or
2. included from another file
I know I could use something like this to see if it was called via a url
like http://www.site.com/interceptor.php :
if (strstr('in
10 matches
Mail list logo