标签:自己 inux 路径 get led which extension amp grep
fileinfo已集成至php项目源代码内(https://pecl.php.net/package/Fileinfo)
//------wdlinux中的php---------------------------------------------------
wget -c http://cn.php.net/distributions/php-5.6.30.tar.gz
tar -xzvf php-5.6.30.tar.gz
cd /root/php-5.6.30/ext/fileinfo
cd /www/wdlinux/phps/56/include/php/ext/fileinfo
如果没装 php-devel,后面的步骤就会提示 phpize 错误,所以先装上
yum install php-devel
获取装好的 phpize 路径
which phpize
在 ext/fileinfo 目录下执行 phpize
/usr/bin/phpize
编译 fileinfo
./configure --with-php-config=/www/wdlinux/phps/56/bin/php-config
make && make install
//-----自己安装的php------------------------------------------------------
tar -zxvf php-7.1.0.tar.gz
cd php-7.1.0/ext/fileinfo
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-fileinfo
make && make install
echo ‘extension="fileinfo.so"‘ >> /usr/local/php/etc/php.ini
service php-fpm restart
php -i | grep fileinfo
......
fileinfo
fileinfo support => enabled
标签:自己 inux 路径 get led which extension amp grep
原文地址:https://www.cnblogs.com/chenjian/p/11445136.html