Problems with require() and variables
| From: | Phil Powell | Date: | Thu, 16 Jan 2003 04:32:44 +0000 |
| Subject: | Problems with require() and variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131810@lists.php.net to get a copy of this message | ||
Consider this:
I have display.php, a script that will do XML parsing into an array and display its contents.
I have view.php, a script that will include display.php and have to manipulate the variables within
display.php for itself.
So in view.php I have:
require('/.../.../display.php');
However, when display.php finishes being "required", I lose all of my variables that I
need for view.php. How do I retain them?? How can I ensure that these variables in display.php will
also exist in view.php?
Thanx
Phil