Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在.html文件中启用Webmatrix Intellisense for PHP_Php_Html_.htaccess_Webmatrix - Fatal编程技术网

在.html文件中启用Webmatrix Intellisense for PHP

在.html文件中启用Webmatrix Intellisense for PHP,php,html,.htaccess,webmatrix,Php,Html,.htaccess,Webmatrix,有没有办法将WebMatrix配置为将.html文件与.php文件一样处理 我正在编辑一个在.html文件中包含php代码的现有网站。站点功能正常,因为相应的处理程序声明位于.htaccess中。我想使用WebMatrix来编辑这些,但希望intellisense/Formatting for php能够工作,但当然WebMatrix只会在它们是.php扩展名时将它们识别为php。由于生产环境以这种方式工作,因此开发环境保持一致是有意义的。将所有文件重命名为.php会导致链接中断的风险太高。请在

有没有办法将WebMatrix配置为将.html文件与.php文件一样处理

我正在编辑一个在.html文件中包含php代码的现有网站。站点功能正常,因为相应的处理程序声明位于.htaccess中。我想使用WebMatrix来编辑这些,但希望intellisense/Formatting for php能够工作,但当然WebMatrix只会在它们是.php扩展名时将它们识别为php。由于生产环境以这种方式工作,因此开发环境保持一致是有意义的。将所有文件重命名为.php会导致链接中断的风险太高。

请在文件web.config中尝试此操作


我不确定我是否理解。主机是Apache,因此没有web.config文件。在运行webmatrix IIS的本地计算机上未安装,并且在webmatrix路径中未看到web.config文件?
<rewrite>
    <rules>
        <rule name="REWRITE_TO_PHP">
        <match url=".html" />
        <conditions logicalGrouping="MatchAll" />

        <action type="Rewrite" url=".php" />
            </rule>
    </rules>
</rewrite>