In order to get Dreamweaver to color PHP code in .html files you will need to move the .html extension into the PHP documenttype.
First, exit Dreamweaver.
You will need to edit at least two Dreamweaver configuration files.
NOTE: I suggest you make backup copies of all files before editing them.
First edit the %dreamweaver install directory%\configuration\Extensions.txt file.
NOTE: %dreamweaver install directory% is the directory you have Dreamweaver installed in.
In my Extensions.txt file, line 2 contained:
HTM,HTML,HTA,HTC,XHTML:HTML Documents
Remove the first ,HTML from the line. It should now read:
HTM,HTA,HTC,XHTML:HTML Documents
Then around line 16 you will see the PHP line. Mine was:
PHP,PHP3,PHP4,PHP5,TPL:PHP Files
Insert the ,HTML after TPL and before the colon. It should now read:
PHP,PHP3,PHP4,PHP5,TPL,HTML:PHP Files
Save the changes.
You may also have a copy of the Extensions.txt in your %USERPROFILE%\Application Data\Adobe|Macromedia\Dreamweaver#\Configuration directory.
NOTE: %USERPROFILE% is your \Documents and Settings\%USERNAME% folder and %USERNAME% is your login name.
NOTE Adobe|Macromedia and Dreamweaver# will vary depending on your Dreamweaver version.
If there is a Extensions.txt file there you can
- edit it as well
- copy the Extensions.txt file from your %dreamweaver install directory%\configuration directory over it
- delete it
Next, you need to edit the %dreamweaver install directory%\configuration\DocumentTypes\MMDocumentTypes.xml file.
On the documenttype id=“HTML” line (line 3 in my file) remove html, from the winfileextension="html, and macfileextension="html, attributes.
Then on the documenttype id=“PHP_MySQL” line (line 75 in my file) add ,html to the end of both the winfileextension="php, and macfileextension="php, attributes. It should look something like:
winfileextension=“php,php3,php4,php5,html” macfileextension=“php,php3,php4,php5,html”
Save the changes.
That’s it. Restart Dreamweaver and .html files are color coded as if they were .php files.