Reply to Re: Also... Re: PHP includes question

Your name:

Reply:


Posted by Geoff Berrow on 02/01/07 13:39

Message-ID: <Klgwh.2288$4H1.1860@newssvr17.news.prodigy.net> from
Sanders Kaufman contained the following:

>No - and you may find this weird.
>An include/require will be included no matter what.
>
>For example:
><? php
>if(TRUE){
> include "myfile.php";
>} else {
> include "yourfile.php";
>}
>?>
>
>In the above example - BOTH files will be included no matter what.

Not quite sure what you are saying here as this clearly is not the case
in practice.

http://www.ckdog.co.uk/test/includes.php

<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";
}

?>

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

[Back to original 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

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