Forum Moderators: coopster

Message Too Old, No Replies

Viewing PHP

How can I check that my PHP code is working?

         

eeyore131

2:28 pm on Jun 16, 2009 (gmt 0)

10+ Year Member



Hi,
I'm a newbie on this website and everything that I've read so far has been really helpful.
I have been designing a website and have got to a bit of a stumbling block. I'm hoping someone on here will be able to help me.
I've designed my first page, and fiddled with it until I've got the layout right and everything looking how I want in all the browsers. Now I want to start work on the rest of the pages.
I want to make it easy and have one file for the header, etc. so making any changes is simple and quick. I've saved a file (header.php) and followed all the instructions I have found to insert this into my main page.
I've spoken to my host server, and I'm actually changing servers next week, and PHP will definitely be available to me, but I can't tell if the php has actually loaded properly in the page. When I preview it in the browsers, the whole header section disappears. Is this normal? Will it only show up when I put it online?
I've also downloaded and installed WAMP but I'm not sure what to do with it now, so I don't know how I can view what I've done.
Hopefully my question makes sense!
I can post the code if that helps.
Looking forward to your replies, if you can help!
Thanks!

jatar_k

2:43 pm on Jun 16, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld eeyore131,

>> Will it only show up when I put it online?

exactly

though you said you installed wamp, if it is working correctly you should be able to view it in a browser in your local setup.

really though, I usually do it on the server, as long as you're not messing with the live pages or the site is still in the dev stages it shouldn't be an issue.

configurations and settings are usually very different between local and remote setups and this can cause a fair bit of confusion for beginners. I would suggest staying in a single environment until you get things straightened out.

but that's just me, just wait for the posts saying the opposite ;)

g1smd

7:54 pm on Jun 16, 2009 (gmt 0)

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



Put your site in the /www/ folder of WAMP and then see if you can see it in your browser via [localhost...] or [127.0.0.1...]

eeyore131

8:12 pm on Jun 16, 2009 (gmt 0)

10+ Year Member



Thank you both for your replies. I tried viewing it through WAMP and it works perfectly! It's such a relief knowing that it is actually coded right and everything!

Thank you once again.