Jump to content

[SOLVED] php pages not displaying correctly


gr3mlin

Recommended Posts

I have set up and installed wamp. I've been using it with no problems, for the last month.

 

I am able to go to http://localhost and see my web server. However, when I try out a PHP page, it doesn't display properly. The page should have a background, structured layout and settings edited with css. Instead I get one really long page (no horizontal scroll bar) no background, structure of any kind or css settings.

 

I've looked for a solution on the web and found someone else had a similar problem. They fixed it by doing this 'I had to enable "short form tag openers" in the php settings' But I don't know where to find this! Can anyone help?

 

It's really frustrating because I've just started learning php and I seem to have fallen at the first hurdle!

 

Thanks very much,

 

James.

I tried making this file <?=phpinfo()?> when I viewed it nothing appeared. Just a white screen.

 

Short open tags are not enabled by default on WAMP, you can enable this setting from then PHP settings tray menu. It is recommended to use full PHP tags though. However to view phpinfo on wamp you can go to index.php?info=1 (provided you keep the default index.php)

 

Regarding the screenshot (which isnt very clear) this appears to be more of a HTML/CSS issue. Your stylesheet is not being loaded from the looks of things. This doesnt seem to be a php issue.

You were absolutely spot on, it was a HTML problem. I'm so sorry to waste everyone's time! I changed the file from .html to .php, Dreamweaver then said 'would you like to update the links'? I said yes and because I had moved the old files to a new folder it was looking in the wrong place.

 

Thanks so much for your help, hopefully I wont make any more stupid errors for a while!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.