php安装fileinfo扩展的方法:1、进入php源文件目录,执行【/usr/local/php/bin/phpize】;2、执行【./configure --with-php】命令;3、添加扩展,重启服务器即可。
php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用
本文操作环境:centos 7、php 7.1、thinkpad t480电脑。
下面是php安装fileinfo扩展的方法的具体步骤:
第一步找到 phpize 的目录,一般是在你安装好了的php目录下 我的是在 /usr/local/php/bin/phpize
第二步找到你安装的php的源文件目录 我之前是用oneinstack 一键安装的php环境;所以我在/home/package/oneinstack/src/ 目录下解压
tar -zxvfphp-5.6.31.tar.gz
登录后复制
第三步 进入php目录下 /ext/fileinfo/
第四步 执行 /usr/local/php/bin/phpize 会产生 configure文件 [原因可查看 ]
第五步./configure --with-php-config=/usr/local/php/bin/php-config 【/usr/local/php/bin/ 是你自己的php目录】
第六步
make && make install
登录后复制
第七步 /usr/local/php/etc/php.ini 添加扩展:extension=fileinfo.so
第八步 重启nginx 以及 php-fpm 这个时候phpfinfo信息里也会出现fileinfo
推荐学习:php培训
以上就是php怎么安装fileinfo扩展的详细内容,更多请关注php中文网其它相关文章!