You are here: Re: Also... Re: PHP includes question « PHP Programming Language « IT news, forums, messages
Re: Also... Re: PHP includes question

Posted by Toby A Inkster on 02/02/07 09:44

Geoff Berrow wrote:

> <a href='includes.php?file=f1'>file one</a> | <a
> href='includes.php?file=f2'>file two</a><br><br>
> <?php
>
> if(isset($_GET['file'])&& $_GET['file']=="f1"){
> include("f1.php");
> }
> elseif(isset($_GET['file'])&& $_GET['file']=="f2"){
> include("f2.php");
> }
> else{
> echo "No file included";
> }
>
> ?>

This doesn't really disprove Sanders' point: both files may have been
included, but only one output to the browser -- the other one may have
simply been parsed and ready.

That said, I believe the behaviour Sanders describes was changed with
PHP 4. include()ed and require()ed files are now only loaded on demand.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация