You are here: Re: 'nested conditional' that can identify parent page? « PHP Programming Language « IT news, forums, messages
Re: 'nested conditional' that can identify parent page?

Posted by Alan Jones on 05/13/07 17:37

On Sun, 13 May 2007 09:44:20 +0200, Schraalhans Keukenmeester
<invalid@invalid.spam> wrote:

>> echo ($_SERVER['REQUEST_URI']);
>>
>> and...
>>
>> echo basename($_SERVER['REQUEST_URI']);
>>
>> ...returned the name of the file it is in, the include 'child' file,
>> and not the actual page URL accessed; /index.php. I need the
>> include script to know if it is being run within index.php.
>>
>
>It _should_ tell you the top level calling script. Show us what you
>are doing exactly please.

Thanks for the help. Please see my response to Jerry's post. Just
want to consolidate the thread. :)

>Btw, I am no fan of include files behaving
>differently depending on where they're called from. What if your script
>name changes ?

I hope to get the request_uri result working correctly for now, and
then compose a script simple enough to not cause future problems.

>Open_basedir is a php setting telling the server the top_level directory
>from which files can be opened in your scripts. It's commonly set to point
>to your httpdocs dir. (In php.ini)
>You got this warning because you tried linking files from your server's
>root directory. Link takes a filepath, not a url. In other words, remove
>the / from the arguments. (Or provide a full path to the file):
>
>link ("index.php","index_body.php");

Thanks, I'll put that aside for now. Hopefully, I won't need to use
link().

>Using the phpinfo() function you can see if open_basedir is set and if so,
>to what directory.

Apparently it is: /home/httpd/vhosts/jalanjones.com/httpdocs:/tmp

I assume that's the correct setting.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация