Running an extension less file as php

懵懂的女人 提交于 2019-12-11 05:37:23

问题


I was using .htaccess to run an extensionless file as PHP using

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

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 .

Also i tried

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

Then the file is getting downloaded instead of executing.


回答1:


Got it fixed by making application/x-httpd-php it as application/x-httpd-php5

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


来源:https://stackoverflow.com/questions/38943929/running-an-extension-less-file-as-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!