Try a require on a file that doesn't exist and then an include on one that
doesn't exist.  That will show you the difference.

-Rasmus

On Fri, 29 Mar 2002, [Windows-1252] Jürgen Freundel wrote:

> Hey;
>
> i have tried to find the difference in use of require and include.
> In my example I can't find any:
>
> test.php:
>
> <html>
> <body>
> <h2>test with require</h3>
> <?
>   $wahr = true;
>   $falsch = false;
>
>   echo "<b>require with true</b><br>";
>   if ($wahr) require("requiret.inc");
>   echo "<b>require with false</b><br>";
>   if ($falsch) require("requiref.inc");
>   echo "<b>require in a loop</b><br>";
>   for($z=1;$z<=5;$z++){
>     require("require$z.inc");
>   }
> ?>
> </body>
> </html>
>
> The requireX.inc have the structure:
>
> <?
>   echo "$z: answer from require$z.inc<br>";
> ?>
>
> In the documentation is written, that it does not works, but the result is
> in the attachment.
>
> Im working with Windows 98, Apache 1.3.22 and PHP 4.0.6 in CGI-mode
>
> With best regards
>
> Jürgen Freundel
>

Reply via email to