使用PHP与SAPRFC连接

问题描述

我想使用PHP与SAP-RFC建立连接。我已经用PHP 5.2.8,Apache 2.0.54和SAP-RFC 1.4.1安装了“ Wamp”服务器。我使用的是旧版本的PHP,因为在7.2版中找不到太多帮助。

我已完成以下步骤:

  1. 更改了主机/服务器IP,系统编号,R3名称,客户端,用户名和密码等参数。
  2. 将DLL文件放在扩展文件夹中,并在PHP.ini文件中提到它。
  3. 在system32目录中添加了librfc32.dll文件。

$LOGIN = array ( "ASHOST"=>"xx.xxx.x.xxx","CLIENT"=>"130","USER"=>"xxxx","PASSWD"=>"xxxx","CODEPAGE"=>"1404"); $rfc = saprfc_open ($LOGIN); if (! $rfc ){ echo "RFC connection failed with error:".saprfc_error(); exit; }


include_once ("../sap.php");
$sap = new SAPConnection();
// Params:  hostname   sysnr
$sap->ConnectToApplicationServer ("xx.xxx.x.xxx ","00"); 
// Params:  client username  password  language
$sap->Open ("130","xxxx","xxxxx","EN");  // Login credentials have been added in the code.
$sap->PrintStatus();
$sap->GetSystemInfo();
echo "<BR><PRE>"; print_r ($sap); echo ("</PRE>");
$sap->Close();

获取输出-“未安装SAP RFC扩展。正在退出...。”

我们将非常感谢您的帮助。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...