Mobile app version of vmapp.org
Login or Join
Welton855

: Testing a website on a local server displays differently to offline I am currently designing a website and at the moment it is getting quite annoying as the design doesn't seem to be displaying

@Welton855

Posted in: #Design #WebsiteDesign

I am currently designing a website and at the moment it is getting quite annoying as the design doesn't seem to be displaying properly when testing it through WAMP in server mode. It displays perfectly well if I simply double click the php file and display it without any server code, however this is also frustrating as I would like to be able to see my server code with my design. I have already cleared the cache, and I still get the same result...

Any help on this situation?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

3 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

To start I would make sure with a very simple PHP file and try with

<?php
echo "Hello world!";
?>


and

<?p
echo "Hello world!";
?>


Make sure you don't have any new line after the closing quote ?>.

This are silly error that can make you waste lots of time.

Then start to introduce new functionality one by one until your server break and you will know what is wrong.

Good luck.

10% popularity Vote Up Vote Down


 

@Jamie184

This is a bit tricky to answer. There are obviously some big differences between displaying your page offline to online (in your test server). All URL paths (root-relative, absolute and even relative) are going to be different depending on your setup. Content-Type headers (normally sent from the server) could differ, so files are interpreted differently, etc.

This is assuming your server-side (generated) HTML is not breaking your layout.

10% popularity Vote Up Vote Down


 

@RJPawlick198

It is not the cache problem. If you are using any server side programming language like PHP, then you have to place your files on the server (like your local server WAMP). Place your php files there, and then open it in the browser like

localhost/yourproject/yourfile.php

If you are code has no errors, then it will display the page correctly, and if it has any errors , then it will not work fine or will display errors / warnings / notice etc .

Also at the top of your php file, place the below code to enable errors so you can see if there are any errors in your php code:

error_reporting(E_ALL);


Hope this will help.

Thank you

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme