【问题标题】:How to:CodeIgniter to create and call SoapClient in php如何:CodeIgniter 在 php 中创建和调用 SoapClient
【发布时间】:2013-07-17 10:48:27
【问题描述】:

我是 CodeIgniter 和 PHP 的新手。

谁能告诉我如何使用 CodeIgniter 创建一个 Soap 客户端来调用 Soap 服务器方法?只是任何示例或示例。

请帮助我,我想了解 Soap 在 Codeigniter 中如何为我的新网络应用工作?

【问题讨论】:

    标签: php codeigniter soap-client


    【解决方案1】:

    在 CodeIgniter 中使用 SoapClient 与使用普通的旧 PHP 没有什么不同。

    例如使用 SoapClient 从 Magento 加载订单:

    $client = new SoapClient($magento_server . "/index.php/api/v2_soap?wsdl=1");
    $session = $client->login($magento_api_user, $magento_api_key);
    
    $filters = array(
       'created_at' => array( '>' => $from_date),
       'created_at' => array( '<' => $to_date)
    );
    
    $orders = $client->salesOrderList($session, $filters);
    

    PHP 参考:http://php.net/manual/en/class.soapclient.php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-16
      • 1970-01-01
      • 2021-11-02
      • 2016-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多