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

PHP Syntax Error Reporting For Non PHP Files?

Community Expert ,
Jan 22, 2017 Jan 22, 2017

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

Paul-M - Community Expert
671
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 , Jan 22, 2017 Jan 22, 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_

...
Translate
Community Expert ,
Jan 22, 2017 Jan 22, 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 & 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
Community Expert ,
Jan 22, 2017 Jan 22, 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!
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 ,
Jan 22, 2017 Jan 22, 2017
LATEST

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!
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 ,
Jan 22, 2017 Jan 22, 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
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