gr3mlin Posted June 17, 2009 Share Posted June 17, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/ Share on other sites More sharing options...
thebadbad Posted June 17, 2009 Share Posted June 17, 2009 If your problem is short tags, use full tags: <?php //php code ?> not <? //php code ?> Everyone will recommend it. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858149 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 In that case my problem has nothing to do with short tags. I only ever use the full ones, tbh I didn't even know there were two sorts! Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858184 Share on other sites More sharing options...
wildteen88 Posted June 17, 2009 Share Posted June 17, 2009 How are you saving your files? Make sure you're saving them as filename.php Can we see a screenshot of your problem? Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858191 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 I think I'm saving the correctly, I've got index.php, aboutus.php etc Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858194 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 How on earth do I add a image that is saved on my computer? Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858203 Share on other sites More sharing options...
947740 Posted June 17, 2009 Share Posted June 17, 2009 Upload it to flickr or something. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858209 Share on other sites More sharing options...
wildteen88 Posted June 17, 2009 Share Posted June 17, 2009 Upload it to flickr or something. Or here by clicking the Reply button (located at the the top or bottom of the thread) and selecting the Addition Options link to upload your screenshot. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858213 Share on other sites More sharing options...
andyd34 Posted June 17, 2009 Share Posted June 17, 2009 You could also try typing this in a basic text editor like notepad on windows o/s <?=phpinfo()?> save it as something.php then in your browser type http://localhost/something.php and see what it outputs Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858223 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 I tried making this file <?=phpinfo()?> when I viewed it nothing appeared. Just a white screen. Attached should be the screen shot. Cheers for your help folks. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858246 Share on other sites More sharing options...
andyd34 Posted June 17, 2009 Share Posted June 17, 2009 the likelyhood is you do not have php installed on your server Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858264 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 I don't think that can be the problem, other simple things I've done whilst following tutorials all work fine. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858268 Share on other sites More sharing options...
wildteen88 Posted June 17, 2009 Share Posted June 17, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858280 Share on other sites More sharing options...
gr3mlin Posted June 17, 2009 Author Share Posted June 17, 2009 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! Quote Link to comment https://forums.phpfreaks.com/topic/162595-solved-php-pages-not-displaying-correctly/#findComment-858290 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.