Skip to main content
gbotour
Known Participant
June 12, 2018
Answered

View in browser shows only code.

  • June 12, 2018
  • 2 replies
  • 502 views

Using DW CS5.5 with PHP file extensions and no testing server with no server side code in the pages. As the title shows when I go to preview in any browser only the code is displayed.

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer BenPleysier

Yep, that is normal behaviour and has nothing to do with Dreamweaver.

A browser interprets HTML, CSS and JS, but not PHP. For a browser to interpret PHP you will need a server to compile the file into an HTML document on the fly.

Solution:

  • Change the file extension to HTML

or

  • Install an Apache server

2 replies

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
June 13, 2018

Yep, that is normal behaviour and has nothing to do with Dreamweaver.

A browser interprets HTML, CSS and JS, but not PHP. For a browser to interpret PHP you will need a server to compile the file into an HTML document on the fly.

Solution:

  • Change the file extension to HTML

or

  • Install an Apache server
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
kglad
Community Expert
Community Expert
June 12, 2018