跳到主要內容

發表文章

目前顯示的是有「phpize」標籤的文章

What is phpize

What is phpize According to the PHP official document : The phpize command is used to prepare the build environment for a PHP extension. If you need to build such an extension that from github or another code repositories, you can use  build tools to perform the build manually. 

使用phpize

什麼是phpize?phpize是用來加入php擴充模組。 如果想在已經編譯好的php加入擴充模組,則可以使用phpize。 以下以安裝 phpredis 為範例 # 先進入到phpredis資料夾 cd phpredis # 會發現資料夾裡有個*.m4, 在執行phpize時必須要有的檔案 phpize # 會出現以下資訊 Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 # 執行此資料夾的configure,是用來產生編譯時需要的Makefile檔案 ./configure # 接著就開始編譯並安裝 make make install 安裝後要記得在php.ini上加入extension=redis.so phpize詳細資訊到 php.net 查看