从https://github.com/Garethp/php-ews下载php-ews并执行
require_once ($server_path."/scripts/ews/API.php");这似乎有效(日志没有错误)。
但这样做:
$ews = ExchangeWebServices::fromUsernameAndPassword($exchange_host, $_SESSION["user_data"]["u_email"], $_SESSION["user_data"]["u_pwd"], $options = array());给出
PHP Fatal error: Class 'ExchangeWebServices' not found 有人有主意吗?
发布于 2016-05-23 14:20:27
我建议你试着用作曲家安装我的库。你可以在这里下载。然后,一旦安装,您就可以使用它安装我的库了。只需使用以下内容创建一个composer.json文件
{
"require": {
"garethp/php-ews": "0.8.*"
}
}然后在目录中运行一个composer install。这将创建一个带有vendor/文件的vendor/autoload.php文件夹。包含这个文件,其余的类应该自动加载。
发布于 2016-05-23 20:12:49
通过删除“exchange”选项是否有效的支票使其工作。
删除
if ($core_row["exchange_active"] == 1) {它们围绕着api调用。
require 'scripts/ews/vendor/autoload.php';
$exchange_host = $core_row["exchange_host"].":".$core_row["exchange_port"];
$version = "Exchange2013"; // to be optional in core_data
//Create and build the client
use garethp\ews\API;
$ews = API::withUsernameAndPassword($exchange_host, $_SESSION["user_data"]["u_email"], $_SESSION["user_data"]["u_pwd"], $version);让我的日子变得更美好..。
结果
echo "<pre>"; print_r(get_declared_classes()); echo "</pre>";
......
[358] => ComposerAutoloaderInitbc25b4c7c627f48ed3a0f739e38bad53
[359] => Composer\Autoload\ClassLoader
[360] => Composer\Autoload\ComposerStaticInitbc25b4c7c627f48ed3a0f739e38bad53
[361] => garethp\ews\API
[362] => garethp\ews\API\ExchangeWebServices
[363] => garethp\ews\API\ExchangeWebServicesAuth
[364] => garethp\ews\API\ClassMap
[365] => garethp\ews\API\NTLMSoapClient
[366] => garethp\ews\HttpPlayback\HttpPlaybackhttps://stackoverflow.com/questions/37373516
复制相似问题