PHP include logic makes it impossible to track down files [message #1006119] |
Wed, 30 January 2013 02:17 |
Dave H Messages: 43 Registered: January 2010 |
Member |
|
|
I'm trying to find certain included files by holding Ctrl+click on the "include" line but because of PHP's include logic, it doesn't work because the include path is relative to the parent file... if I add or subtract ../ at the beginning of the path until I can Ctrl+click it, it takes me to the file but then breaks the script when it runs. This seems like a design flaw in PHP; an included file considers its parent's path the current directory and any relative include paths must be to that directory. It means I can't simultaneously have a valid relative path there and be able to Ctrl+click to go to the file.
Are there any other solutions besides setting an absolute path everywhere? I want to avoid this as we may move folders. Also, if there's a server config setting we can do, such as making PHP consider the included file's path the current directory while it's running, that would be excellent, as I haven't found that setting yet.
|
|
|
Powered by
FUDForum. Page generated in 0.02726 seconds