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

Php error in Html Dreamweaver

New Here ,
Oct 17, 2017 Oct 17, 2017

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

1.4K
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 18, 2017 Oct 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.

Translate
Community Expert ,
Oct 17, 2017 Oct 17, 2017

which DW build ?

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
LEGEND ,
Oct 18, 2017 Oct 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

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 18, 2017 Oct 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.

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 18, 2017 Oct 18, 2017
LATEST

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 & 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