|
Posted by Neredbojias on 06/22/07 20:19
On Fri, 22 Jun 2007 03:59:34 GMT BootNic scribed:
>> Uh, who do you think I am, -Einstein?
>> I'd take it kindly if you'd please explain the above in detail so my
>> headache would go away and I could get back to watching those reruns
>> of "The Three Stooges" I enjoy so much...
> [snip]
>
> Work the statement from right to left.
>
> Server variables: $_SERVER['PHP_SELF']
> The filename of the currently executing script, relative to the
> document root. For instance, $_SERVER['PHP_SELF'] in a script at the
> address http://example.com/test.php/foo.bar would be
> /test.php/foo.bar.
>
> explode('/',$_SERVER['PHP_SELF'])
> explode Split a string by string returns an array of strings
> returns array('temp','mydri','index.php')
>
> array_pop(explode('/',$_SERVER['PHP_SELF']))
> array_pop() pops and returns the last value of the array...
> returns 'index.php'
>
> explode('.',array_pop(explode('/',$_SERVER['PHP_SELF'])))
> explode Split a string by string returns an array of strings
> returns array('index','php')
>
> array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_SELF']))))
> array_shift() shifts the first value of the array off and returns
> it...
> returns 'index'
Okay, thanks, I pretty much get it now. The prob is I'm just not that
familiar with php in depth. Sure, it's great, but I only use it when I
convince myself I absolutely have to because it does produce a delay in
rendering a page. While this delay is quite small, typically about a
second or less, and is not particularly bothersome per se, the glaring
white blank background displayed by most browsers during the wait is.
Mozilla seems to be the only one of the major offerings that doesn't
suffer from this anomoly.
--
Neredbojias
He who laughs last sounds like an idiot.
[Back to original message]
|