TShopping

 找回密碼
 註冊
搜索
查看: 1858|回復: 0
打印 上一主題 下一主題

[教學] 安裝PEAR套件在cPanel可直接引入DB.php

[複製鏈接]
跳轉到指定樓層
1#
發表於 2014-5-19 18:29:33 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
首先進入CPANEL

1.找到Software/Services 區塊的 PHP PEAR Packages 圖標

2.打開PEAR  點選 Show Available PHP Extension(s) and Application(s) button to see the list of PEAR packages.


3.You will see a long list of extensions that may go on for many pages. Select your desired extension and click on the Installbutton. Our example will demonstrate the installation of theArchive_Zip extension.


4.After clicking the Install button, the package will automatically install onto your account. Once completed, you will see some information regarding the extension on the page. Click on theGo Backbutton to finish.


5.You can now see your newly installed PEAR module in the list.




然後進入php.ini
  1. vi /usr/lib/php.ini
複製代碼
加入PEAR路徑如/usr/share/php及/usr/share/php/PEAR
  1. include_path = ".:/usr/share/php:/usr/share/php/PEAR"
複製代碼
重啟apache
  1. /etc/init.d/httpd restart
複製代碼
就可以直接在PHP下直接
  1. require "DB.php"
複製代碼



計的要把該網站的PEAR下的資料全部COPY到 /usr/share/php/PEAR



 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-20 10:42 , Processed in 0.062427 second(s), 25 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表