Home  >  Article  >  php教程  >  phpize是什么

phpize是什么

WBOY
WBOYOriginal
2016-06-13 10:45:272530browse

 

安装php(fastcgi模式)的时候,常常有这样一句命令:/usr/local/webserver/php/bin/phpize

一、phpize是干嘛的?

phpize是什么东西呢?php官方的说明:

http://php.net/manual/en/install.pecl.phpize.php

phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块

比如你想在原来编译好的php中加入memcached或者ImageMagick等扩展模块,可以使用phpize,通过以下几步工作。

二、如何使用phpize?

当php编译完成后,php的bin目录下会有phpize这个脚本文件。在编译你要添加的扩展模块之前,执行以下phpize就可以了;

比如现在想在php中加入memcache扩展模块:我们要做的只是如下几步

————————————————————————

tar zxvf memcache-2.2.5.tgz

cd memcache-2.2.5/

/usr/local/webserver/php/bin/phpize

./configure –with-php-config=/usr/local/webserver/php/bin/php-config

make

make install

————————————————————————

注意./configure 后面可以指定的是php-config文件的路径

这样编译就完成了,还需要做的是在php.ini文件中加入extension值

extension = “memcache.so”

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn