Re: Include file must be valid

From: Date: Fri, 28 Jul 2000 17:50:20 +0000
Subject: Re: Include file must be valid
Groups: php.general 
Request: Send a blank email to php-general+get-8828@lists.php.net to get a copy of this message
I fail to see the problem. If someone doesn't understand how to create a while structure, perhaps they should learn it rather than creating wacky code. Jason Stechschulte jpstech@nc.edu -----Original Message----- From: Simon Biela [mailto:s.biela@netdienste.de] Sent: Friday, July 28, 2000 1:36 PM To: Zeev Suraski; php-general@lists.php.net Subject: Re: [PHP] Include file must be valid But this issure is not really helpful for developers. The documentation says, that include just pulls the content of the file into the other file. I don't want that file to be evaluated for itself. The example I gave, is a help for people who don't understand how to create a while structure but want to use it. Instead of writing while ($output[something][$i]) { or even something more complex, they just have to write include(whilestart) What other possibility do I have to solve this problem? Thanks for answer Simon >That's true. It's an issue which should be documented - it's not a bug. > >Zeev On Fri, 28 Jul 2000, Simon Biela wrote: > Hi there! > > I just migrated from PHP3 to 4. In 3 it was possible to include a file which > wasn't really valid, for example with an opened while statement, which was > then closed in another include file. > > It seems, that in PHP4 the code in an include file must be completely valid. > > here's an example > > file1.php > $i = 0; while($something[$i]) { > > file2.php > $i++; } > > file3.php > include (file1.php); > echo $i > include (file2.php); > > > --- > netdienste GbR > internet & multimedia > Geisselstrasse 19 > 50823 Koeln > > tel: +49 221 - 932 958 2 > fax: +49 221 - 932 958 5 > > s.biela@netdienste.de > http://www.netdienste.de > > red:pepper - das redaktionssystem > www.redpepper.netdienste.de > > > > > > -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#8828) next »