middleman666;11001414 wrote:But this returns:
Warning: require_once(misc/script.php): failed to open stream: No such file or directory in /home/site/one.php
Doesn't it make sense that you should get an error? After all, you're telling PHP to open the file /home/site/misc/script.php which, according to your directory structure above, probably doesn't exist.
middleman666;11001414 wrote:This didn't used to return any errors, but I'm unsure what has changed for this to start appearing.
The only way that (incorrect) relative path would work is if PHP was told to base the relative path off of some directory other than the current working directory. For example, if you added the path '/home/' to PHP's include_path directive, then a relative path of 'misc/script.php' would then make sense.
However, is there any reason why you can't just use a correct path?