找回密碼
 註冊
搜索
TShopping 精選文章 電腦網絡 查看內容

安裝PEAR套件在cPanel可直接引入DB.php

2014-5-19 18:30| 發佈者: woff| 查看: 1633| 評論: 0|原作者: woff

摘要: 首先進入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 lo ...
 
首先進入CPANEL

1.找到Software/Services 區塊的 PHP PEAR Packages 圖標
1.png
2.打開PEAR  點選 Show Available PHP Extension(s) and Application(s) button to see the list of PEAR packages.
2.PNG

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.
3.PNG

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.
4.PNG

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



然後進入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"
複製代碼





最新評論

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-4-30 18:22 , Processed in 0.017218 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

返回頂部