用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1157|回复: 0
收起左侧

[版本 3.x] CI框架安装nusoap

[复制链接]
发表于 2015-11-24 18:27:43 | 显示全部楼层 |阅读模式
<?phpclass Bills_WS extends CI_controller {    function __construct() {        parent::__construct();        $this->load->library("Nusoap_lib");        $this->load->model("Member");        $this->nusoap_server = new soap_server();        $this->nusoap_server->configureWSDL("Bills_WSDL", "urn:Bills_WSDL");        $this->nusoap_server->register('hello',                // method name            array('name' => 'xsd:string'),        // input parameters            array('return' => 'xsd:string'),      // output parameters            'urn:Bills_WSDL',                      // namespace            'urn:Bills_WSDL#hello',                // soapaction            'rpc',                                // style            'encoded',                            // use            'Says hello to the caller'            // documentation        );    }    function index(){        if($this->uri->rsegment(3) == "wsdl") {            $_SERVER['QUERY_STRING'] = "wsdl";        } else {            $_SERVER['QUERY_STRING'] = "";        }                function hello($name) {                return 'Hello, ' . $name;        }        $this->nusoap_server->service(file_get_contents("php://input"));    }}安装的nusoap但是不知到怎么跟M层交互,在hello函数中添加$this->Member->hello();就报错了,什么原因的啊?

本版积分规则