Forum Moderators: coopster
Alright here is my php code <?php @include("test.php"); ?>. It works, but only if I add phptesting to it so it reads <?php @include("phptesting/test.php"); ?>. On my other sites were I am not using my local server/wamp to test, I just use test.php or similar. As those with Wamp know, your local host server is located in the C/wamp/www folder. And within it is a preexisting index.php file that you cannot or should not overwrite. So if I place another folder within it to test - I understand why you have to use yadayada/test.php verses test.php - but there has to be another way so that I can test it exactly how I am placing the links on the actual site (ie relative links - test.php)
A perfect example would be my hostgator account. I have a primary domain and then within that root I have to two more folders/domains. And with each I can just say contact.html verses I do not have to use yadayada/contact.html.
So what gives? Is this just the way it is with the wamp/local server structure? Or am I just thoroughly confused?
Basically - who has wamp or similar installed on their computer? And is this how you have to specify the links? Thanks guys!
you can stick this this at the top of your file, and change it to wherever you want. it's a good idea to stick it somewhere outside of the root, for safetys sake (above the htdocs directory)
ini_set('include_path', '/your_path_to_includes_directory');
I have been viewing/reading three different tuts about PHP set-up, strangely enough nobody really gets into the nuts and bolts of the file structure set-up. I am a pretty resourceful guy, and it actually was not that easy. At least with Dreamweaver that is - lots of combinations of different file paths you have to specify in order for it to work. Oh well I am happy.
[edited by: coopster at 7:07 pm (utc) on Mar. 1, 2008]
[edit reason] removed tutorial link specifics [/edit]