主頁 > 知識庫 > linux安裝php擴展腳本分享

linux安裝php擴展腳本分享

熱門標簽:地方門戶網(wǎng)站 AI電銷 網(wǎng)站排名優(yōu)化 鐵路電話系統(tǒng) Linux服務器 服務外包 百度競價排名 呼叫中心市場需求

測試環(huán)境:ubuntu 12.04 php 5.3.x

復制代碼 代碼如下:

#!/bin/bash
#Program:
# Accomplish to expand the specified function only one key
#History:
# 2013/11/15 pankai530911044@qq.com> first release
test ! -f ./ext_skel echo "The shell script of 'ext_skel' doesn't exist in current directory.\n" exit 0
[ ! -d "skeleton" ] echo "The directory of 'skeleton' doesn't exist in current directory.\n" exit 0
#include "./ext_skel"
read -p "Please input the extension name: " ext_name
#echo -e "hello $ext_name"

#The blank space is necessary
#Error:
#  like: if[ ! -d "$ext_name" ]; then
if [ ! -d "$ext_name" ]; then
 ./ext_skel --extname=$ext_name
fi
file="./$ext_name/config.m4"
copy="./$ext_name/config"
if [ ! -f "./$ext_name/configs" ]; then
 # Create a new file and clear it if it exists
 :> "$copy"
 cat "$file" | while read line
 #for line in $( cat ./zend/config.m4 )
 do
  string=$( echo $line | grep 'PHP_ARG_ENABLE' )
  if [ "$string" != ""  ]; then
   echo $line | cut -c5- >> $copy
   read line
   echo $line | cut -c5- >> $copy
   read line
   echo $line | cut -c5- >> $copy
   read line
  fi
  echo $line >> $copy
 done
 mv "$file" "./$ext_name/configs"
 mv "$copy" "./$ext_name/config.m4"
fi
cd $ext_name
phpize
./configure

您可能感興趣的文章:
  • 如何使用Linux的Crontab定時執(zhí)行PHP腳本的方法
  • 在PHP中運行Linux命令并啟動SSH服務的例子
  • Linux下php5.4啟動腳本

標簽:黃山 湖南 仙桃 崇左 湘潭 銅川 蘭州 衡水

巨人網(wǎng)絡通訊聲明:本文標題《linux安裝php擴展腳本分享》,本文關鍵詞  ;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266