Re: Include question

From: Date: Wed, 12 Jun 2002 01:36:22 +0000
Subject: Re: Include question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-101657@lists.php.net to get a copy of this message
Yes, but according to http://www.php.net/manual/en/function.include.php I should be able to delcare the include and then pull the information out normally. So by what the manual says I can do this somefile.php <? $apple = 'green'; $pear = 'yellow'; ?> callfile.php <? include 'somefile.php'; echo "Apples are $apple and Pears are $pear"; \\ which would return the line with green and yellow in the correct spots. ?> But when I just do <? include 'somefile.php'; ?> It prints: $apple = 'green'; $pear = 'yellow': Why is that? John Holmes wrote:
Umm...that's what it's supposed to do...it's "including" it... ---John Holmes...
-----Original Message----- From: Tom Ray [mailto:tom@blazestudios.com] Sent: Tuesday, June 11, 2002 9:29 PM To: php-general@lists.php.net Subject: [PHP] Include question I'm trying to use the include function in some PHP scripts, but when I
do
include 'config.inc'; or include 'config.php; It returns all the information in the file when I look at my test php file (which calls the include) Anyone know why this is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
.


« previous php.general (#101657) next »