我指的是此处提到的步骤 phpSPO,首先使用命令
composer require vgrem/php-spo
将库包含在我的 php 应用程序中。但是当使用下面的代码创建客户端时,对我来说不起作用。我收到的所有客户端属性均为 null
。
use Office365\Runtime\Auth\ClientCredential;
use Office365\SharePoint\ClientContext;
$credentials = new ClientCredential("{clientId}", "{clientSecret}");
$ctx = (new ClientContext("{siteUrl}"))->withCredentials($credentials);
如果有人遇到同样的问题并得到解决,请也指导我。 谢谢。
按照这篇文章,我能够解决这个问题。谢谢。
https://stackoverflow.com/questions/67861925/php-using-phpspo-with-sharepoint-how-to-create-folder-in-a-subsite