Skip to main content
dogooder
Participant
October 18, 2017
Answered

Php error in Html Dreamweaver

  • October 18, 2017
  • 4 replies
  • 1521 views

Hello,

I get a closing tag error ">" when i insert php into html;

<html>

<?php

?>

</html>

I was referred to the forum by Nishtha in customer support chat

This topic has been closed for replies.
Correct answer Nancy OShea

Save your PHP coded files with the  .php  extension.

NOTE:  You will need a local testing server set-up & defined in DW.

Go to View > Live Code.

Use Live Document Validation.  See screenshot.

4 replies

Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
October 18, 2017

Save your PHP coded files with the  .php  extension.

NOTE:  You will need a local testing server set-up & defined in DW.

Go to View > Live Code.

Use Live Document Validation.  See screenshot.

Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
October 18, 2017

Does the page have a .html or .php file extension?

The Linter in DW will give the "special characters must be escaped" error if the file has a .html extension and has a php include.

It will not show any error on a .php file.

Legend
October 18, 2017

dogooder  wrote

Hello,

I get a closing tag error ">" when i insert php into html;

<html>

<?php

?>

</html>

I was referred to the forum by Nishtha in customer support chat

You will get an error as the validator inside DW or any other editor for that matter doesn't like raw php being inserted into html code. If you run the complied page through the W3c validator your page should pass, without any errors.

The W3C Markup Validation Service

B i r n o u
Legend
October 18, 2017

which DW build ?