मैं निम्न फ़ाइल संरचना है:पीएचपी की आवश्यकता होती है() रिश्तेदार पथ त्रुटि
:require('../../dir2/file3.php')
file2.php
file1.php
इस तरह की आवश्यकता है:
rootDIR dir1 subdir1 file0.php file1.php dir2 file2.php file3.php file4.php
file1.php
इस तरह file3 और dir2 से file4 की आवश्यकता है
require('../dir1/subdir1/file1.php')
लेकिन फिर फ़ाइल 1 में फ़ाइल फ़ाइल खोलने में विफल रहता है और file4 (शायद पथ relativeness के कारण)
हालांकि क्या कारण है और मैं file2.php
के लिए क्या कर सकते हैं ताकि file1.php
ठीक से की आवश्यकता होती है file3 और file4
http://stackoverflow.com/questions/11383960/how-to-refer-back-to-public-html-root-file-using-include-after-going-up-one-file यहां आपको एक स्पष्ट स्पष्टीकरण। –