Skip to main content
Legend
Jan 23, 2017 1:33 AM UTC
Answered

PHP Syntax Error Reporting For Non PHP Files?

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 is closed to new replies. Start a new post to keep the conversation going.
BenPleysier
BenPleysierCorrect answer
Community Expert
Jan 23, 2017 4:40 AM UTC

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!

4 replies

Paul-MAuthor
Legend
Jan 23, 2017 3:58 AM UTC

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.

Translate
Paul-M - Community Expert
Nancy OShea
Community Expert
Community Expert
Jan 23, 2017 1:42 AM UTC

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

Translate
Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
Jan 23, 2017 2:37 AM UTC

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.

Translate
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
Jan 23, 2017 4:40 AM UTC

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.

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