|
<?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();就报错了,什么原因的啊?
|
|