简体   繁体   English

.htaccess启用php fileinfo扩展

[英].htaccess enable php fileinfo extension

I've used shared host for hosting my application and the version is php5.3.27 . 我使用共享主机来托管我的应用程序,版本是php5.3.27 I'm getting an error like 我收到的错误就像

 Call to undefined function finfo_open() 

So I've gone through some articles where I suggested by enabling fileinfo extension in .htaccess. 所以我通过在.htaccess中启用fileinfo扩展来阅读我建议的一些文章。 For the first time I'm getting this error. 我第一次收到这个错误。 Please help me to get the solution. 请帮我解决问题。 The work would be more appreciated. 这项工作将更受赞赏。

See this answer : 看到这个答案

In your php.ini file, make sure you have something like this in it: 在你的php.ini文件中,确保你有这样的东西:

extension=fileinfo.so

or if you're on windows, php_fileinfo.dll . 或者,如果你在Windows上, php_fileinfo.dll

It's easy actually to access and modify php.ini file to enable file info. 实际上很容易访问和修改php.ini文件以启用文件信息。 I just know by accident. 我只是偶然知道。 So you search software/service which is there is select PHP version. 所以你搜索选择PHP版本的软件/服务。 Click it, and you will see your PHP Version. 单击它,您将看到您的PHP版本。 Try to change first (downgrade or upgrade, up to you) and then you will see that below there is fileinfo which in default not checklist yet. 尝试先改变(降级或升级,直到你),然后你会看到下面有fileinfo,默认情况下还没有清单。 All you have to is, return the version of your PHP, and then checklist fileinfo, and click save. 您只需返回PHP的版本,然后检查文件信息,然后单击“保存”。 Thats it. 而已。

In your .htaccess, put this line: 在你的.htaccess中,把这行:

Windows 视窗

php_value extension php_fileinfo.dll

*nix (Linux, Mac, etc) * nix(Linux,Mac等)

php_value extension fileinfo.so

如果你在共享主机上我继续上面的答案,即包括扩展名,你是否正在运行爸爸只是在你的网站的根目录中创建一个文件并命名为.user.ini这是你如何更改设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM