
Originally Posted by
Locker
Surely that wont have the desired effect? For example, the path could be...
/something/something/scriptlocation
In this situation, it would look for config.php in the first "/" directory, rather than "scriptlocation".
Of course. I was assuming his config file would be in the root directory. In your example, the include would be
PHP Code:
include '/something/something/config.php';
It would be more complicated if he didn't know the exact folder, because it wouldn't be possible to hard code the path to the file. But it seemed to me from his OP that this is not the case. He tried an absolute path, and got an error. If he knows the absolute path to the file, he'll be able to know the relative path starting from the root ('/') as well.
Bookmarks