Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

F12 displays code and not design for .php pages

New Here ,
Oct 20, 2018 Oct 20, 2018

Hello,

when I press F12 to see how the pages look like, .php pages diplay the lines of code and not the design of the page. It used to work fine before and I know I can display in Dmweaver the design but I prefer F12 (when it works)

thanks

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 20, 2018 Oct 20, 2018

Chrome without a testing server cannot render anything beyond ordinary HTML, CSS and JS code.  Either you had a testing server installed and didn't know it or your page didn't contain any server side scripts.

When working with PHP code, DW always asks me to set-up a testing server if one is not already defined.

Screenshot without a testing server.

With local testing server.

Translate
Community Expert ,
Oct 20, 2018 Oct 20, 2018

I am probably stating the obvious, but I'll suggest it, are you using a PHP server to view your work? Has the Dreamweaver site been properly configured?

Please see How to set up a testing server in Dreamweaver

If that wasn't the problem, please come back here with more info.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2018 Oct 20, 2018

thanks for your answer, but I've installed over 1000 thousands websites in my Dreamweaver interface, withouth configuring any php server for almost all of them. It would take too much time to add them

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2018 Oct 20, 2018

To give you a bit of basic knowledge, a web browser can only interpret HTML, CSS and JS. Anything else will not be processed by a browser. PHP is a server side language which dynamically interprets PHP code into HTML so that the browser can in turn interpret the code. If you do not have an active server, the browser will receive the PHP code which it cannot interpret.

The websites that did not have any problems, would not have included PHP documents, most likely they were HTM or HTML documents.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2018 Oct 20, 2018

Many thanks BenPleyser,

Until now, Chrome was able to display php pages without having any web servers installed, simply by pressing F12 in DW or even opening a document in any folder.

Or at least, it's what I think I was doing. Maybe that somebody has an explaination.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2018 Oct 20, 2018
LATEST

Chrome without a testing server cannot render anything beyond ordinary HTML, CSS and JS code.  Either you had a testing server installed and didn't know it or your page didn't contain any server side scripts.

When working with PHP code, DW always asks me to set-up a testing server if one is not already defined.

Screenshot without a testing server.

With local testing server.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines