|
Posted by Captain Paralytic on 02/01/07 11:19
On 1 Feb, 11:14, "P Pulkkinen"
<perttu.POISTATAMA.pulkki...@POISTATAMA.elisanet.fi> wrote:
> Dear A Kaufman, I can't IMAGINE what you mean by this post in one previous
> thread.
>
> =================================================
> "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."
> =================================================
>
> This is NOT OF COURSE the case!
>
> http://perttu.finote.com/muuta/test.php
>
> Here I have in same folder files myfile.php and yourfile.php, other one
> echoing
> This text comes from file myfile.php
> and other one echoing
> This text comes from file yourfile.php
>
> but OF COURSE test.php prints only "This text comes from file myfile.php"
He did not say that the contents of both files would be executed, he
said that both files would be included. The if/then/else statement
will ensure that the contents of yourfile.php do not get executed,
however they WILL be included.
Navigation:
[Reply to this message]
|