Skip to main content
Legend
January 23, 2017
Answered

PHP Syntax Error Reporting For Non PHP Files?

  • January 23, 2017
  • 2 replies
  • 674 views

As far as I can see PHP syntax error reporting only works on PHP files? How do we enable for other file types?

This topic has been closed for replies.
Correct answer BenPleysier

Actually, after rethinking my workflow, if I were to add PHP to an HTML document, I would probably go to MMDocumentTypes.xml and add  the highlighted lines.

<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">

    <TITLE>

        <MMString:loadString id="mmdocumenttypes_0" />

       <MMString:loadString id="mmdocumenttypes_14" />

    </TITLE>

    <description>

        <MMString:loadString id="mmdocumenttypes_1" />

        <MMString:loadString id="mmdocumenttypes_15" />

    </description>

    <dtdcontext>html</dtdcontext>

</documenttype>

My apologies, just tested the above and it does not work.

2 replies

Paul-MAuthor
Legend
January 23, 2017

For .inc files you could probably just add INC to the list for PHP Files in the Extensions.txt file in the Dreamweaver config folder, I don't think it's as straight forward with a HTML file for example and I don't want to be renaming files or using any other lame workaround.

Paul-M - Community Expert
Nancy OShea
Community Expert
Community Expert
January 23, 2017

Energize wrote:

As far as I can see PHP syntax error reporting only works on PHP files? How do we enable for other file types?

Maybe by renaming the files with a .php extension?

Which file types are you working with that need PHP error reporting?

Nancy

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
January 23, 2017

Nancy OShea

I used to use the .inc extension for included files and lost my syntax highlighting and error reporting. Since coming to my senses, I use the .php extension for all of my php files.

My reason for using .inc files was to show exactly that, it is an included file and not a full document. Now I place an underlying dash to show that it is a partial file as in _myHeader.php and place the file in a folder called included..

Sanity has been restored.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
January 23, 2017

Actually, after rethinking my workflow, if I were to add PHP to an HTML document, I would probably go to MMDocumentTypes.xml and add  the highlighted lines.

<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">

    <TITLE>

        <MMString:loadString id="mmdocumenttypes_0" />

       <MMString:loadString id="mmdocumenttypes_14" />

    </TITLE>

    <description>

        <MMString:loadString id="mmdocumenttypes_1" />

        <MMString:loadString id="mmdocumenttypes_15" />

    </description>

    <dtdcontext>html</dtdcontext>

</documenttype>

My apologies, just tested the above and it does not work.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!