Jean-Pierre Gallou schrieb:
> Thank you for your reply. Goetz Lohmann wrote :
> 
>> Failed opening '/inc/inc2.php'
> 
> 
> Yes, I don't understand the reason of the leading slash in the error
> message.
> 
>> ... maybe try something like
>>
>> include('./inc/inc1.php');
>>          ^^
> 
> 
> same thing: Failed opening './inc/inc2.php' for inclusion
> 


mhhh ... wait ... don't you wrote

test/
 |- testinclude.php   <? include ('inc/inc1.php'); ?>
 |- inc/
    |- inc1.php       <? include ('inc/inc2.php'); ?>
    |- inc2.php       OK

wich means that "testinclude.php" includes "inc/inc1.php"
and "inc/inc1.php" includes "inc/inc2.php" ?

the include is like a copy of the code from
"inc/inc1.php" into "testinclude.php" so that in the
first sighth it might be correct to call "inc/inc2.php"
instead of "inc2.php".

But maybe the parser of PHP 4.3.0 is rewritten so that it
now parse it bottom up. That means that first the inclusion
of "inc/inc2.php" into "inc/inc1.php" will happen which
fails cause its in the same directory.

... I tried it on my server ... all went Ok ... strange ...

insert something like into inc1.php and inc2.php:

<?php
   echo "inc included<br>\n";
   echo "<br>\n";
   $folder=dir('inc');
   // print out folder "inc"
   while($datei = $folder->read()) {
      echo "$datei<br>\n";
   }
   $folder->close();
   echo "<br>\n";
?>

maybe did it head anywhere else or did it show something like

inc included
inc included

.
..
inc1.php
inc2.php


.
..
inc1.php
inc2.php


???


-- 
 @  Goetz Lohmann, Germany   |   Web-Developer & Sys-Admin
\/  ------------------------------------------------------
()  He's the fellow that people wonder what he does and
||  why the company needs him, until he goes on vacation.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to