沃梦达 / 编程问答 / php问题 / 正文

如何将sharepoint与php连接

how to connect sharepoint with php(如何将sharepoint与php连接)

本文介绍了如何将sharepoint与php连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何集成Sharepoint和Php.我正在尝试开发可以连接到 Sharepoint 的 php 应用程序.特别是因为基本上我是网站开发人员,我希望我的所有网站都与 Sharepoint 连接.所以,我只想创建 PHP 应用程序,使其适用于所有网站.我不知道是否可行,但我想尝试一下,但不知道如何进行.

欢迎提出任何想法/建议.

提前致谢.

解决方案

试试这个 API

在 SharePoint 中

下载 WSDL.通常在这个位置:/subsite/_vti_bin/Lists.asmx?WSDL

下载 API

确保同时保存 SoapClientAuth.phpSharePointAPI.php

在 PHP 中

//0: 在你的 php 脚本中包含 api.require_once('SharePointAPI.php');//1: 连接到 SharePoint$sp = new SharePointAPI('<用户名>', '<密码>', '');//2: 读取列表$listContents = $sp->read('');//3: 现在你有了一个可以在 PHP 中使用的二维数组foreach($listContents 作为 $item){var_dump($item);}

通过这个API,您还可以查询、更新、创建、删除列表,查询列表元数据

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 want my all websites to be connected with Sharepoint. So, simply I want to create Php app such that it works for all the websites. I don't know is it possible or not but I want to give it a try but don't know how to proceed.

Any idea/suggestions is welcome.

Thanks in advance.

解决方案

Try this API

In SharePoint

Download the WSDL. Usually at this location: <sharepoint.url>/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('<username>', '<password>', '<path_to_WSDL>');

// 2: read a list
$listContents = $sp->read('<list_name>'); 

// 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

这篇关于如何将sharepoint与php连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何将sharepoint与php连接

基础教程推荐