Highlighted

F12 displays code and not design for .php pages

New Here ,
Oct 20, 2018

Copy link to clipboard

Copied

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

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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.

Views

178

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

F12 displays code and not design for .php pages

New Here ,
Oct 20, 2018

Copy link to clipboard

Copied

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

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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.

Views

179

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 20, 2018 0
Adobe Community Professional ,
Oct 20, 2018

Copy link to clipboard

Copied

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.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2018 1
New Here ,
Oct 20, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2018 0
Adobe Community Professional ,
Oct 20, 2018

Copy link to clipboard

Copied

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.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2018 1
New Here ,
Oct 20, 2018

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2018 0
Adobe Community Professional ,
Oct 20, 2018

Copy link to clipboard

Copied

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, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2018 1