NYCPHP Meetup

NYPHP.org

[nycphp-talk] Problems with require and variables

CHUN-YIU LAM chun_lam at hotmail.com
Thu Jan 16 21:15:19 EST 2003





Have you tried include?


----Original Message Follows----
From: "Phil Powell" <soazine at erols.com>
Reply-To: talk at nyphp.org
To: NYPHP Talk <talk at nyphp.org>
Subject: [nycphp-talk] Problems with require and variables
Date: Wed, 15 Jan 2003 23:35:27 -0500
Received: from mc3-f14.law16.hotmail.com ([65.54.236.149]) by 
mc3-s11.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 15 Jan 
2003 20:45:48 -0800
Received: from parsec.nyphp.org ([66.250.131.26]) by 
mc3-f14.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 15 Jan 
2003 20:45:18 -0800
Received: from nyphp.org (parsec.nyphp.org [66.250.131.26])by 
parsec.nyphp.org (8.12.6/8.12.6) with ESMTP id h0G4ZRps044437;Wed, 15 Jan 
2003 23:35:27 -0500 (EST)(envelope-from listmaster at nyphp.org)
Message-Id: <200301160435.h0G4ZRps044437 at parsec.nyphp.org>
X-Paralist-Archived: <http://nyphp.org/list/paralist_archive.php?L_mid=2331>
X-List-Software: Paralist 0.6
List-ID: <nyphptalk.nyphp.org>
List-Owner: <mailto:listmaster at nyphp.org>
List-Archive: <http://nyphp.org/list/paralist_archive.php?L_lid=1>
List-Subscribe: <http://nyphp.org/list/>
List-Unsubscribe: <http://nyphp.org/list/>
Organization: New York PHP
X-Mailer: Paramail 0.5
Return-Path: listmaster at nyphp.org
X-OriginalArrivalTime: 16 Jan 2003 04:45:18.0896 (UTC) 
FILETIME=[1205BB00:01C2BD1A]

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



--- Unsubscribe at http://nyphp.org/list/ ---

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* 
http://join.msn.com/?page=features/virus




More information about the talk mailing list