我目前在通过化学从 Alfresco 下载文件时遇到问题。
这是我的代码:
// Create the session
$repository = new CMISService($repositoryUrl, $userName, $password);
$uuid = $_GET['uuid'];
$contentData = $repository->getObject($uuid);
$tempurl = $repository->getLastRequestURL();
// TEMPORARY URL IS THIS: "http://193.43.168.90:8082/alfresco/api/-default-/public/cmis/versions/1.1/atom/id?id=6b82d8db-2003-467d-91e3-17a2d27f6a68";
$fp = fopen($tempurl, 'r');
$DMSContent = stream_get_contents($fp);
fclose($fp);
我无法下载该文件,因为它返回“HTTP 请求失败!HTTP/1.1 401 未经授权”。这就像我没有登录到 Alfresco。我怎样才能做到这一点?