如何将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连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Subtract time in PHP(在 PHP 中减去时间)
Limit execution time of an function or command PHP(限制函数或命令 PHP 的执行时间)
How to sum N number of time (HH:MM Format)?(如何求和 N 次(HH:MM 格式)?)
How to get current time in milliseconds in PHP?(如何在 PHP 中以毫秒为单位获取当前时间?)
How to check if time is between two times in PHP(如何检查时间是否在 PHP 中的两次之间)
Convert number of minutes into hours amp; minutes using PHP(将分钟数转换为小时数分钟使用 PHP)