Hi all,
Moi nguoi oi, giup do gium voi.
Minh` co' ta.o mot module moi, trong do' co' tao. mot class moi va include file SOAP/Client.php.
Khi chay tren moi truong window thi OK, ko bi loi gi ca, nhung khi chay tren moi truong Linux no' van goi duoc cac phuong thuc trong class, tuy nhien song song do', trong report ben admin van bao cai loi "
"include_once() [function.include]: Failed opening 'SOAP/Client.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/savingcall/sites/all/modules/mydrupalwebsite/includes/mywebservice.php on line 3."
Khong hieu tai sao luon, mac du van chay duoc ma van bao cai loi.
"Noi dung file mywebservice.php" nhu ben duoi
<?php
include_once 'SOAP/Client.php';
class mywebservice
{
var $wsclient;
function mywebservice(){
$wsdl_url = "http://localhost/MyService1.asmx?wsdl";
ini_set( 'soap.wsdl_cache_enabled', false );
ini_set( 'soap.wsdl_cache_ttl', 0 );
$this->wsclient = new SoapClient($wsdl_url, array('exceptions' => 1,'connection_timeout'=>3600));
}
function authenticate($phone_number, $password)
{
$result = $this->wsclient->Authenticate(array("phone"=>$phone_number, "password"=>$password));
if (is_soap_fault($result)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
}else{
return $result->AuthenticateResult;
}
}
}
?>
Bạn vui lòng nhập tiếng Việt
Bạn vui lòng nhập tiếng Việt có dấu.
Thanks,
Thế Hồng
Post new comment