note 21077 added to function.include
| From: | php at klimpong dot com | Date: | Sat, 27 Apr 2002 15:21:07 +0000 |
| Subject: | note 21077 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29919@lists.php.net to get a copy of this message | ||
If you do:
<?
/* file: script1.php */
$var="TEST STRING";
include("http://www.domain.com/script2.php");
?>
$var will be not set in script2.php. Even if script1.php and script2.php reside on the same server.
Instead do:
<?
/* file: script1.php */
$var="TEST STRING";
include("script2.php");
?>
Same goes with require().
--
http://www.php.net/manual/en/function.include.php
http://master.php.net/manage/user-notes.php?action=edit+21077
http://master.php.net/manage/user-notes.php?action=delete+21077
http://master.php.net/manage/user-notes.php?action=reject+21077