Re: [請益] jpgraph裝不上去...

看板PHP作者 (寶貝豬)時間16年前 (2009/08/22 18:20), 編輯推噓1(107)
留言8則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《ChengTing (格格)》之銘言: : 小妹想試試jpgraph : 但是 照了網頁上的安裝方式 : 他還是出現錯誤訊息 : Warning: require_once(jpgraph/jpgraph.php) [function.require-once]: failed to : open stream: No such file or directory in : C:\xampp\htdocs\jpgraph\Examples\balloonex1.php on line 3 對於在Examples\ballonex1.php而言, 它當然找不到 jpgraph/jpgraph.php php.ini設一下: include_path='.;C:\xampp\php\pear\' 改成: include_path='.;C:\xampp\php\pear\;C:\xampp\htdocs\jpgraph' 改好後重新啟動web server, 這樣應該就行了. : Fatal error: require_once() [function.require]: Failed opening required : 'jpgraph/jpgraph.php' (include_path='.;C:\xampp\php\pear\') in : C:\xampp\htdocs\jpgraph\Examples\balloonex1.php on line 3 : 我回去看我的jpgraph.php及balloonex1.php : 裡面的路徑照理來說應是對的 : 不懂我到底錯在哪 : 爬文跟google都說安裝很簡單 : 我試了很久還是不成功...@@" : 特次此來請教各位大師~~ : 甘溫~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.183.16

08/22 23:58, , 1F
他還是不行耶 錯誤原因一樣...
08/22 23:58, 1F

08/22 23:59, , 2F
請問include_path這一段是甚麼意思呢??
08/22 23:59, 2F

08/23 00:00, , 3F
include 或 require 所要引進的檔案的所在路徑.
08/23 00:00, 3F

08/23 00:02, , 4F
總之,現在只要讓php知道要去哪裏找jpgraph.php檔就對
08/23 00:02, 4F

08/23 00:03, , 5F
了.一般有兩種方式,一種是在程式當中用相對路徑或絕
08/23 00:03, 5F

08/23 00:04, , 6F
對路徑的寫法指示, 另一種就是透過環境變數的設定.
08/23 00:04, 6F

08/23 00:04, , 7F
在不用改任何程式碼的情況下,就應採用第二種方式.
08/23 00:04, 7F

08/23 00:13, , 8F
對了,有把最前面代表註解的標記 ; 去掉嗎?
08/23 00:13, 8F
文章代碼(AID): #1AZyPT76 (PHP)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #1AZyPT76 (PHP)