Re: auto_prepend_file question

From: Date: Tue, 14 Nov 2000 21:20:19 +0000
Subject: Re: auto_prepend_file question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25237@lists.php.net to get a copy of this message
I'm not sure i understand? Are you including prepend.php in your index.php file? You'll need the "require()" function for that. I created two files and it seemed to work fine for me: PREPEND.PHP: <? $Message = "testing..."; ?> and INDEX.PHP: <? require "./prepend.php"; print $Message; ?> Give that a try. on 11/14/00 4:14 PM, Ed Lazor at osmosis@atfantasy.com wrote: > If I prepend a file and define a variable in it, I should be able to access > that variable in index.php, right? > > So, if the prepend.php file has this: > > $Message = "This is a test<br>"; > > And then index.php has this: > > print $Message; > > I should end up with with the following text on my web browser when I load > the page: > > This is a test > > Right? At least, that's the way I thought it worked, but it's not working > for some reason and I'm trying to figure out what the problem is. > > Thanks, > > -Ed >

« previous php.general (#25237) next »