woff 發表於 2014-5-19 18:29:33

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

首先進入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.inivi /usr/lib/php.ini加入PEAR路徑如/usr/share/php及/usr/share/php/PEARinclude_path = ".:/usr/share/php:/usr/share/php/PEAR"重啟apache/etc/init.d/httpd restart就可以直接在PHP下直接require "DB.php"了


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


頁: [1]
查看完整版本: 安裝PEAR套件在cPanel可直接引入DB.php