Rahmin Pavlovic wrote:
Say I'm an include.  Say several templates include me into what will become
a single web page.  How can I tell which template is calling me?

The easiest way is when the template identifies itself. I use a script for output in two contexts and want to make sure to return to the right place. I registered the path of the calling script with the session and use that to figure out what to do and where to go.

There may be also a way to use the $_SERVER array, I think one element includes the name of the calling page. I tend not use $_SERVER as it contains different things with different names or sometimes not that much on various servers.

David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to