繁体   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