dtf1111 2012-08-16 17:04
浏览 101
已采纳

PHP SharePoint API文档子目录列表

I've just implemented the SharePointAPI for PHP which can be found https://github.com/thybag/PHP-SharePoint-Lists-API

I was able to retrieve all of the SharePoint Lists from the WSDL, and was able to use the ->read($list) function to retrieve a List which holds Document folders and files.

Within the list, if the item is a file, I'm able to download it fine. However, if the item is another folder (a subdirectory), how do I access that directory's folders and files?

The ->read($list) function doesn't work, and I'm kind of at a loss. Does anybody know how I can read a List item's folders and files as it were a List?

Thanks alot

  • 写回答

1条回答 默认 最新

  • drzrzzkh462254 2013-07-01 14:26
    关注

    Although part of me suspects you are probably the person who ended up managing to answer their own question over on the github issues; I thought I may as well repost that answer here in case others have the same problem.

    Essentially (although its a bit of a work around) you can get a listing of the contents of a folder in a sharepoint list, by calling the following method:

    $sp->read($listName,
              NULL,//$limit 
              NULL,//$query
              NULL,//$view 
              NULL,//$sort 
              "<Folder>" . $listName . "\\" . $folderName . "</Folder>"//$options 
    )
    

    Hopefully once manage to find a bit of spare time, I'll add a dedciated method for doing this to the library, just to make it a little more straight forward in future.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?