Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
PHP require() - change working dir?
Name: RadleyGH Date: February 20, 2008 at 01:30:08 Pacific OS: Windows XP Pro CPU/Ram: Athlon X2 5200+, 2gb DDR2 Product: Custom built
Comment:
I have several require() functions that also have require() functions in them that build the theme of my website. The theme is done, but I tried making a subdirectory and when I use the same page the require() is obviously in a different location.
I tried using require("../inc/includedfile.php"); which does work for the file, but the files within ignore the required files directory and use the current subdirectory.
Can you change the "working directory" of the require() function?
Summary: Yeah...the PHP require will work fine with .htm files. require("nav.htm") works fine on mine...No php code in the html file at all. SSI would work better than PHP as long as the site is in regular HT...
Summary: bazooka, OK, couple of things. First, AWESOME site man! That thing is pretty sweet and it sounds like you have a lot of fun. I'm ready to go pick up a DFX myself and have at! Really, the design and ...
Summary: Hello! We have made a site with loggin using $_SESSION for setting session variables. This works perfectly in the Windows environment (WinXP-Apache-PHP-MySQL). We now try to transfer the system to Lin...