I'm brand new to php and I'm trying to work with some includes in my site and can't quite figure out how to make them all work correctly. My site structure is as follows
/ROOT/
Config.php
Index.php
/ADMINISTRATION/
Index.php
mustInclude.php
/USERS/
Index.php
"MustInclude.php" "config.php" içerir ve Index.php her şeyi kısa sürede KULLANICILARI / içine "mustInclude.php" eklemeyi deneyin gibi çalışıyor, ama "mustInclude.php" içeriyorsa / Index.php kırılır çünkü " mustInclude.php "include '../config.php';
gibi bir yol kullanıyor ve bunun için / KULLANICI / index.php aynı göreli yol değildir / YÖNETİM / index.php gibi
Ben burada ne gerçekten emin değilim.
Bu artık benim yerel makinede. Benim dosya yapısı (/ Users / James / Siteler) verir, çünkü kullanılarak $_SERVER['DOCUMENT_ROOT']
yerine benim web yapısından daha bana hata veriyor (http://localhost/mysite)
Yardım?