2012-11-22 33 views
1

我試圖通過localhostbigquery api之間的連接,使用google-api-php-client,它工作得很好,但後來我試圖將它託管到一個網站,我得到一個致命的錯誤說法,Google Big Query使用php腳本,無法將api託管到網絡上

Fatal error: Class 'Google_ServiceResource' not found in /home/XXXXX/public_html/api/src/contrib/Google_BigqueryService.php on line 25 

Fatal error: Class 'Google_Client' not found in /home/XXXXX/public_html/api/sample.php on line 9 

我無法弄清楚這個問題,在localhost,當我在我的localhost它工作完全正常使用「api」文件夾中,但在它給出了一個錯誤。

+0

針對此問題的任何解決方案? – xzegga

回答

0

此錯誤通常是由於PHP腳本路徑錯誤。嘗試使用__DIR__變量來提供PHP腳本正在運行的路徑,並使用它來構建庫的位置。有關於此堆棧溢出的信息很多,這裏是an example

此外,請查看關於how to include客戶端lib文件的Google API PHP客戶端庫的文檔。

+0

非常感謝,Micahael :) – Aps18

+0

@ Aps18你是如何解決它的? – Nevermore