搜尋
首頁後端開發PHP7php7怎麼安裝intl擴展

php7怎麼安裝intl擴展

Jan 27, 2022 am 10:13 AM
intlphp7

php7安裝intl擴充的方法:1、下載icu源碼包;2、解壓縮icu及編譯安裝;3、下載並解壓縮php包;4、進入php解壓縮包目錄下,編譯安裝;5、設定檔及啟動檔即可。

php7怎麼安裝intl擴展

本文操作環境:Windows7系統、php7.0.8版、DELL G3電腦

環境

  • php版本:php7.0.8
  • IP:192.168.1.99
PHP intl 是國際化擴展,是ICU 庫的包裝器。所以在安裝PHP intl擴充前要先安裝ICU庫

一.安裝icu庫

#1.1)下載icu原始碼套件

wget http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz

1.2)解壓縮icu及編譯安裝

tar -zxf  icu4c-52_1-src.tgz
mkdir /usr/local/icu
cd icu/source
./configure --prefix=/usr/local/icu
make && make install
二.php編譯安裝

2.1)yum 依賴套件

yum -y install gcc-c gd libxml2-devel libjpeg-devel libpng-devel net- snmp-devel curl-devel libxslt-devel pcre-devel libjpeg libpng libxml2 libcurl4-openssl-dev libcurl-devel libcurl   libmysqlclient  freetype-config freetype#freetype-devel ununfm.套件

http://php.net/downloads.php   套件下載位址
tar -zxf php-7.0.8.tar.gz

2.3)進入php解壓縮套件目錄下,編譯安裝
cd php-7.0.8


./configure --prefix=/usr/local/php708  --with-curl   --with-gd  --with-gettext  --with-iconv-dir  --with-kerberos  --with-libdir= lib64  --with-libxml-dir --with-mysql --with-mysqli  --with-openssl  --with-pcre-regex  --with-pdo-mysql  --with-pdo-sqlite  --with-pear  - -with-png-dir --with-freetype-dir   --with-jpeg-dir  --with-xmlrpc  --with-xsl  --with-zip  --with-zlib  --enable-fpm  --enable-bcmathath --enable-libxml  --enable-inline-optimization  --enable-gd-native-ttf  --enable-mbregex  --enable-mbstring  --enable-opcache  --enable-pcntl  --enable-shmop  --enable- soap  --enable-sockets  --enable-sysvsem  --enable-xml --enable-zip   --enable-intl  --with-icu-dir=/usr/local/icu

make && make install

# 2.4)設定檔及啟動檔

cp php.ini-development /usr/local/php708/lib/php.ini
cp /usr/local/php708/etc/php-fpm.conf.default /usr/local/php708/etc/php-fpm.conf
cp /usr/local/php708/etc/php-fpm.d/www.conf.default /usr/local/php708/etc/php-fpm.d/www.conf
cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm

/etc/init.d/php-fpm

php7怎麼安裝intl擴展

#推薦學習:《php7怎麼安裝intl擴展PHP影片教學

以上是php7怎麼安裝intl擴展的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱工具

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

將Eclipse與SAP NetWeaver應用伺服器整合。

Dreamweaver Mac版

Dreamweaver Mac版

視覺化網頁開發工具

EditPlus 中文破解版

EditPlus 中文破解版

體積小,語法高亮,不支援程式碼提示功能

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。