以php格式运行扩展名较少的文件 [英] Running an extension less file as php
本文介绍了以php格式运行扩展名较少的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用.htaccess使用PHP运行无扩展文件,
I was using .htaccess to run an extensionless file as PHP using
<Files thumbs>
SetHandler application/x-httpd-php
</Files>
但是我将服务器更改为CGI / FastCGI,因为这不起作用。我在网上也尝试过,但是在这里找不到解决方案。
but i changed my server to a CGI/FastCGI since then this is not working. I tried online and also here but couldn't find a solution .
我也尝试过
<Files "thumbs">
ForceType application/x-httpd-php
</Files>
然后将文件下载而不是执行。
Then the file is getting downloaded instead of executing.
推荐答案
通过将application / x-httpd-php设置为application / x-httpd-php5
Got it fixed by making application/x-httpd-php it as application/x-httpd-php5
<Files thumbs>
SetHandler application/x-httpd-php5
</Files>
这篇关于以php格式运行扩展名较少的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文