1

I have a problem related to SAP B1 and PHP 5.5.30 connection. Actually I know how I can connect PHP direct to SAP B1 Database but that is not good way of connection and it's not supported. So what I need to do is to connect PHP with SAP B1 but not direct connection. in order to read and write data in the SAP database. Here is code I tried to do but the result is 0, I do know the meaning of this 0.

    <?php
$mycomp = new COM("SAPbobsCOM.Company") or die("Cannot start SBO");
$mycomp->Server="192.168.0.103";
$mycomp->LicenseServer = "192.168.0.103:30000";
$mycomp->DbUserName = "sa";
$mycomp->DbPassword = "****";
$mycomp->UserName = "manager";
$mycomp->Password = "****";
?>

I have SQL server 2008, I use XAMPP for PHP and Adobe Dreamweaver for coding.

Please anyone can help me.

4

1 回答 1

2

结果 0 表示您已成功连接到公司。

我建议您查看 SDK 示例以更好地了解如何与 DI API 交互。

此外,您可能想要调查 DI 服务器在 DI API 上的使用。DI API 是一个以 .NET 为目标的基于 COM 的库。由于使用 PHP,您可能会遇到兼容性问题。DI 服务器基本上是一个围绕 DI API 的 Web 服务,并且对所有技术堆栈都更加友好。

祝你好运。

于 2016-06-02T20:49:49.033 回答