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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.