我正在尝试连接 PHP-EWS 和我的 Exchange 服务器。我使用来自https://github.com/jamesiarmes/php-ews/wiki的脚本
但是每次我加载我的脚本时,浏览器都会告诉我
未收集异常:错误版本
这是我的脚本(自动加载器在一个额外的文件中,所以不用担心它可以工作)
$server = "***********";
$username="***********";
$password="*******";
$version= "2010"; // or Exchange 2010; Exchange 2010 SP1
$ews = new ExchangeWebServices($server, $username, $password, $version);
$request = new EWSType_FindFolderType();
$request->Traversal = EWSType_FolderQueryTraversalType::SHALLOW;
$request->FolderShape = new EWSType_FolderResponseShapeType();
$request->FolderShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;
// configure the view
$request->IndexedPageFolderView = new EWSType_IndexedPageViewType();
$request->IndexedPageFolderView->BasePoint = 'Beginning';
$request->IndexedPageFolderView->Offset = 0;
// set the starting folder as the inbox
$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();
$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::INBOX;
// make the actual call
$response = $ews->FindFolder($request);
?>
有谁知道为什么我不断得到
未收集异常:错误版本
并且知道该怎么做?