在使用一些PHP模板,框架时,经常遇到一些自定义的后缀,如smarty的tpl, Prado的Page,这些在Dreamweaver中都不能支持打开。
下面的方法是如何定制:
以. ctp为例:
1。打开 Extensions.txt,位置在 C:/Documents and Settings/ Administrator/Application Data/Macromedia/Dreamweaver 8/Configuration(WINXP下)
2.把后缀. ctp加到 ALL DOCUMNET行。
3.把. ctp加到 PHP行. 使用PHP模式打开.ctp后缀类型文件.
4.保存文件。
5.打开 MMDocumentTypes.xml
你安装Dreamweaver的目录/Configuration/DocumentTypes/
MMDocumentTypes.xml .
6.在
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml,page" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,page" file="Default.html" writebyteordermark="false">添加的话,就会用HTML模式打开。
<documenttype id="PHP_MySQL" servermodel="PHP MySQL" internaltype="Dynamic"winfileextension="php,php3,php4,php5 ,ctp" macfileextension="php,php3,php4,php5 ,ctp"file="Default.php" writebyteordermark="false">
添加到折行就会用PHP模式打开。
7.保存文件 OK!重新启动DW吧