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

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

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)