Tom, just did ur test on win2k php 4.2.1 with apache and when i just did ..
<? include 'somefile.php'; ?> i get a blank screen as I should the only way you should be getting anything is by calling the values... -----Original Message----- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 12 June 2002 11:36 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Include question 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:[EMAIL PROTECTED]] >>Sent: Tuesday, June 11, 2002 9:29 PM >>To: [EMAIL PROTECTED] >>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 >> >> > > >. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php