![]() |
![]() |
--Bart-- |
![]()
Post
#1
|
Goście ![]() |
Witam,
Chyba nie do końca jestem świadomy jak działa funkcja include() w PHP. Mam strukturę katalogów: / WWW index.php WWW / KATALOG 1.php 2.php W pliku 1.php jest instrukcja:
A w pliku index.php jest instrukcja:
I najdziwniejsze jest to ze to rozwiazanie DZIALA ! Czy nie powinno byc tak ze w pliku 1.php musi byc:
co zreszta tez DZIALA ! Dzieki za odpowiedz. |
|
|
![]() |
--Bart-- |
![]()
Post
#2
|
Goście ![]() |
Dziekuje za odpowiedz.
No i wszystko sie wyjasnilo - nie wiem czemu umknelo mi to podczas czytania manuala. Jakby ktos mial jeszcze watpliwosci: Files for including are first looked for in each include_path entry relative to the current working directory, and then in the directory of current script. E.g. if your include_path is libraries, current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/libraries/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in the current working directory. " title="Zobacz w manualu PHP" target="_manual Pozdrawiam |
|
|
![]() ![]() |
![]() |
Aktualny czas: 16.10.2025 - 04:48 |