Re: server side including
| From: | David Otton | Date: | Thu, 20 Feb 2003 14:36:58 +0000 |
| Subject: | Re: server side including | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136360@lists.php.net to get a copy of this message | ||
On Thu, 20 Feb 2003 14:41:09 +0100, you wrote:
>Im have a "script.php" which needs to be able to tell if it has been
>included in an .shtml file or not...
>
>e.g. if included is true: do this, else: do something else
>
>I could ofcourse do something like this:
>
><!--#include
>virtual="/packages/combo1/example_red/poll/poll.php?included=yes" -->
>
>but it would be nice to totally let the php check if it has been
>included........
>
>Anyone have any ideas?
If you call phpinfo(), you'll see bunch of variables that are related to
the filename in some way (PHP_SELF, REQUEST_URI, etc.). One of these may
help you.