<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                `gd`庫是一個強大的圖片處理庫。常用的功能裁剪,水印,放大縮小圖片都可以使用它來處理。 網上查詢資料很多都是直接粘貼復制也沒自己驗證過。這里還是借鑒別人的辦法,主要是其與官方的說明比較一致,這里把其步驟一一驗證,依賴的庫換成最新的。 ***** ?? gd庫主要是用來圖像渲染的。gd庫依賴以下libjpeg、libpng、freetype2、xpm等安裝庫。在php中啟用gd擴展有兩種方式一個是動態編譯方式,一個是靜態編譯方式。動態編譯方式不需要重新編譯php,靜態編譯方式必須重新編譯php。但是無論是動態編譯還是靜態編譯都要先安裝gd的相關依賴庫文件,并且在編譯gd時加到configure參數中。 1、安裝`xpm` `yum install libXpm-devel` 2、安裝`zlib` ``` ?? wget http://zlib.net/zlib-1.2.11.tar.gz ?? tar -xzvf zlib-1.2.11.tar.gz ?? cd zlib-1.2.11 ?? ./configure --prefix=/usr/local/zlib-1.2.11 ?? make && make install ?? make clean && make distclean ?? cd ../ ``` 3、安裝`libjpeg` ``` wget http://www.ijg.org/files/jpegsrc.v9c.tar.gz tar -xzvf jpegsrc.v9c.tar.gz cd jpeg-9c ./configure --prefix=/usr/local/jpegsrc.v9c --enable-shared --enable-static make && make install make clean && make distclean cd ../ ``` 4、安裝`libpng` ``` wget https://jaist.dl.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz tar zxvf libpng-1.6.37.tar.gz cd libpng-1.6.317 ./configure --prefix=/usr/local/libpng-1.6.317 make && make install ``` 5、安裝`freetype2`,這個安裝過程,參雜了python升級到版本3 ``` wget http://download.savannah.gnu.org/releases/freetype/freetype-2.10.1.tar.gz tar -xzvf freetype-2.10.1.tar.gz cd freetype-2.10.1 ./configure --prefix=/usr/local/freetype-2.10.1 make && make install make clean && make distclean cd ../ ``` 6、gd安裝 ?? php安裝時使用--with-gd必須要執行以下命令,在直接安裝gd庫是不需要試用-dir,但是在php安裝的時候需要-dir ``` wget https://github.com/libgd/libgd/releases/download/gd-2.2.3/libgd-2.2.3.tar.gz tar -xzvf libgd-2.2.3.tar.gz cd libgd-2.2.3 ./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpegsrc.v9c --with-png=/usr/ --with-zlib --with-freetype=/usr/lib64 make && make install make clean && make distclean cd ../ ``` 7、php安裝gd庫 ?? `靜態編譯` ``` 參見線上環境-LNMP下的php ``` ?? `動態編譯` ``` cd php-5.6.19/ext/gd/ phpize ./configure --with-php-config=/usr/local/php7/bin/php-config --with-jpeg-dir=/usr/local/jpegsrc.v9c --with-png-dir=/usr/local/libpng-1.6.37 --with-freetype-dir=/usr/local/freetype-2.10.1 make && make install // 最后會生成一個gd.so文件在 /usr/local/php7/lib/php/extensions/no-debug-non-zts-20180731/ 發現之前裝的redis,swoole等擴展文件都在該路徑下 make clean && make distclean cd ../ ``` 結果成功:php的圖片處理函數成功,驗證碼生成成功。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看