作为php运行无扩展名文件

作为php运行无扩展名文件,php,.htaccess,cgi,fastcgi,Php,.htaccess,Cgi,Fastcgi,我使用.htaccess运行一个无扩展文件,就像使用PHP一样 <Files thumbs> SetHandler application/x-httpd-php </Files> SetHandler应用程序/x-httpd-php 但是我把我的服务器改成了CGI/FastCGI,从那时起这就不起作用了。我在网上试过,也在这里试过,但找不到解决办法 我也试过了 <Files "thumbs"> ForceType applicat

我使用.htaccess运行一个无扩展文件,就像使用PHP一样

<Files thumbs>
        SetHandler application/x-httpd-php
</Files>

SetHandler应用程序/x-httpd-php
但是我把我的服务器改成了CGI/FastCGI,从那时起这就不起作用了。我在网上试过,也在这里试过,但找不到解决办法

我也试过了

<Files "thumbs">
   ForceType application/x-httpd-php
</Files>

ForceType应用程序/x-httpd-php

然后文件被下载而不是执行。

通过将application/x-httpd-php设置为application/x-httpd-php5来修复它

<Files thumbs>
   SetHandler application/x-httpd-php5
</Files>

SetHandler应用程序/x-httpd-php5