note 96085 added to function.get-include-path
| From: | jcwebb at osu1 dot php dot net | Date: | Mon, 08 Feb 2010 09:42:28 +0000 |
| Subject: | note 96085 added to function.get-include-path | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165740@lists.php.net to get a copy of this message | ||
HEADER resets INCLUDE !!
i used
<?php set_include_path(get_include_path().PATH_SEPARATOR.'/'); ?>
so i could reference files in the root of my website.
<?php require_once 'code_for_this_site_only.php'; ?>
But a few pages later i noticed that my include had reverted back to its original (default)
settings.
why?
It was because of this:
<?php header("Location: http://$gotopage"); ?>
Hope it helps, Jon.
----
Server IP: 69.147.83.197
Probable Submitter: 80.31.242.58
----
Manual Page -- http://www.php.net/manual/en/function.get-include-path.php
Edit -- https://master.php.net/note/edit/96085
Del: integrated -- https://master.php.net/note/delete/96085/integrated
Del: useless -- https://master.php.net/note/delete/96085/useless
Del: bad code -- https://master.php.net/note/delete/96085/bad+code
Del: spam -- https://master.php.net/note/delete/96085/spam
Del: non-english -- https://master.php.net/note/delete/96085/non-english
Del: in docs -- https://master.php.net/note/delete/96085/in+docs
Del: other reasons-- https://master.php.net/note/delete/96085
Reject -- https://master.php.net/note/reject/96085
Search -- https://master.php.net/manage/user-notes.php