how to connect sharepoint with php

前端 未结 3 2081
名媛妹妹
名媛妹妹 2020-12-31 19:47

Do anyone know how to integrate Sharepoint and Php. I am trying to develop php app which can connect to Sharepoint.In particular since basically I am website developer, I wa

3条回答
  •  情书的邮戳
    2020-12-31 20:19

    Try this API

    In SharePoint

    Download the WSDL. Usually at this location: /subsite/_vti_bin/Lists.asmx?WSDL

    Download the API

    Make sure to save both SoapClientAuth.php and SharePointAPI.php

    In PHP

    // 0: include api in your php script.
    require_once('SharePointAPI.php');
    
    // 1: connect to SharePoint
    $sp = new SharePointAPI('', '', '');
    
    // 2: read a list
    $listContents = $sp->read(''); 
    
    // 3: now you have a 2-D array to work with in PHP
    foreach($listContents as $item)
    {
        var_dump($item);
    }
    

    With this API, you can also query, update, create, delete lists, query list metadata

提交回复
热议问题