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

Posted by Norman Peelman on 05/12/07 04:23

Alan Jones wrote:
> Hello everyone, any help would be greatly appreciated. :)
>
> What I'm trying to do may not be advisable, but here goes...
>
> I want a page named signature.php to appear conditionally as
> an include within another include so that it will, for example,
> appear in index.php but not in other result pages that use the
> same top level include.
>
> The method would need to determine what page it is inside of
> during each given instance. I guess something like...
>
> if page is index.php then include file else do nothing
>
> A 'nested conditional' seems obvious but I don't know how to
> create an argument that checks the result page file name or
> otherwise id's that parent page.
>
> Obviously, I'm new to PHP and my understanding of basic
> programming is very limited. I'm also new to the group. I hope
> to learn quickly, and I look forward to helping others in the
> future.

I think you're looking for the $_SERVER super_global variable. Check
http://www.php.net/reserved.variables $_SERVER['REQUEST_URI'] holds the
info you're looking for.

Norm

 

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

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