簡體   English   中英

如何在PHP中包含Google客戶端庫的路徑

[英]How do I include a path of google client library in php

$r = set_include_path(get_include_path() . '\google-api-php-client-master\src');
echo $r;
require_once 'Google/Client.php';
require_once 'Google/Service/AdExchangeSeller.php';

function __autoload($class_name) {
  include 'examples/' . $class_name . '.php';
}

當我在瀏覽器上運行它時,它顯示以下錯誤。 在此處輸入圖片說明

調用set_include_path時未使用路徑分隔符,請嘗試以下操作:

$r = set_include_path(get_include_path() . PATH_SEPARATOR . '\google-api-php-client-master\src');

這是有關set_include_path的文檔

編輯

對php.ini進行更改后,是否重新啟動了Apache?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM