Warning: require(./settings.php) [function.require]: failed to open stream: No such file or directory in W:\www\proxy\themes\Theme2\file.php on line 4 I have double checked and the files do exist. Here is the file structure: domain_root/proxy/themes/theme2/file.php. In file.php I have: <? chdir('../../'); require('./google.php'); require('./settings.php'); require('./style.php'); chdir('./'); ?> PHP: And I get that error, can I not set ../../ as the current directory? All three of those file are in the "proxy" directory. Thanks, BP
chdir has nothing to do with with the require functions as far as I'm aware. You need to add the '../../' to before each of the files you are trying to include in.
No, you can't do that with including and requiring, closest thing to that is using $_SERVER['DOCUMENT_ROOT'] and using the direct path, but that doesn't work on http:// most of the time.
Try: chdir('domain_root/proxy/'); PHP: Also, try requiring the files without the ./ in front. I remember having problems with that once too.