|
Posted by Alan Jones on 05/13/07 03:47
On Sat, 12 May 2007 23:24:25 -0400, Norman Peelman
<npeelman@cfl.rr.com> wrote:
> I'm sorry, maybe I don't understand what you're asking for...
No sorry needed. :)
>doesn't $_SERVER['REQUEST_URI'] do what you need?
>
>if (($_SERVER['REQUEST_URI'] == '/index.php') ||
>($_SERVER['REQUEST_URI'] == '/'))
>{
> include('signature.php');
>}
>
>I found that $_SERVER['REQUEST_URI'] will return '/' at the top of the
>domain name. In other words '/' should be equal to whatever your default
>file is for the domain in question.
>
>Norm
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server>
I went thru the above page last night and the most promising
did seem to be 'REQUEST_URI', which is supposed to output,
"The URI which was given in order to access this page; for
instance, '/index.html'."
However, both...
echo ($_SERVER['REQUEST_URI']);
and...
echo basename($_SERVER['REQUEST_URI']);
....returned the name of the file the request was called from,
the include 'child' file, and not the resulting page URL address;
/index.php. I need the include script to know if it is being run
from within index.php.
Again, thanks for racking your brain on this with me. I'm at a
total loss... :(
BTW, might you or anyone be able to help me understand
'open_basedir restriction'? I received the following error when
trying to use the link() function...
link ("/index.php","/index_body.php");
Warning: link(): open_basedir restriction in effect.
File(/index.php) is not within the allowed path(s):
(/home/httpd/vhosts/jalanjones.com/httpdocs:/tmp) in
/home/httpd/vhosts/jalanjones.com/httpdocs/index_body.php
on line 46
Thanks :)
Navigation:
[Reply to this message]
|