Best practice for PHP paths [duplicate]
问题 This question already has answers here : PHP include best practices question (10 answers) Closed 7 years ago . I have been all over the Internet trying to figure out the best way to handle paths in my website. Should I use relative paths, absolute paths? I have seen dirname ( FILE ) mentioned several times. One problem I have with relative paths is that PHP files which are included by several other files at different directory levels cause the relative paths to break. For example if the