htaccess和php文件-将所有文件视为php?
我在localhost上有一个网站,是最新的MAMP版本。 子文件夹是test2 这是它的.htaccess:htaccess和php文件-将所有文件视为php?,php,html,apache,.htaccess,mamp,Php,Html,Apache,.htaccess,Mamp,我在localhost上有一个网站,是最新的MAMP版本。 子文件夹是test2 这是它的.htaccess: DefaultType text/html DefaultType application/x-httpd-php 这是确保文件同时被视为HTML和PHP的正确方法吗?将其编写为: <Files *> DefaultType text/html DefaultType application/x-httpd-php </Files> Default
DefaultType text/html
DefaultType application/x-httpd-php
这是确保文件同时被视为HTML和PHP的正确方法吗?将其编写为:
<Files *>
DefaultType text/html
DefaultType application/x-httpd-php
</Files>
DefaultType文本/html
DefaultType应用程序/x-httpd-php
dir和subdirs中的所有文件都将作为PHP打开