Forum Moderators: coopster

Message Too Old, No Replies

Wamp install/usage question?

         

ewwatson

1:31 pm on Mar 1, 2008 (gmt 0)

10+ Year Member



Hello everyone, I installed Wamp and configured Dreamweaver for it on my xp OS.

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!

londrum

2:14 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



the 'include' statement points to wherever it's been set up to point to - it's probably just been set up to point somewhere else.

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');

ewwatson

2:17 pm on Mar 1, 2008 (gmt 0)

10+ Year Member



I swear, just the process of writing my questions in this forum usually enables me to fix the problem on my own. Makes me think about it from a different perspective I guess. Well you will all be happy to know that I finally figured it out! I can simply use a relative link now, and it works.... yea!

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]