$client = new SoapClient(null,array('location' =>"http://999.com/sxt/admin/sys/functions.php",'uri'=> "http://88.com/"));
function convert_points($xcoords, $ycoords, $getDistances = false)
{
return $client->convert_points($xcoords, $ycoords, $getDistances);
}
//===============================================================================================
function convert_points($xcoords, $ycoords, $getDistances = false)
{
$client = new SoapClient(null,array('location' =>"http://999.com/sxt/admin/sys/functions.php",'uri'=> "http://88.com/"));
return $client->convert_points($xcoords, $ycoords, $getDistances);
}为什么这两种办法都是错的呢?如里大可以指教一下,把SOAP写到函数里?,
我也可以支付一些酬劳
QQ:251414041
function convert_points($xcoords, $ycoords, $getDistances = false)
{
return $client->convert_points($xcoords, $ycoords, $getDistances);
}
//===============================================================================================
function convert_points($xcoords, $ycoords, $getDistances = false)
{
$client = new SoapClient(null,array('location' =>"http://999.com/sxt/admin/sys/functions.php",'uri'=> "http://88.com/"));
return $client->convert_points($xcoords, $ycoords, $getDistances);
}为什么这两种办法都是错的呢?如里大可以指教一下,把SOAP写到函数里?,
我也可以支付一些酬劳
QQ:251414041
SoapClient,第一个参数好像是wsdl地址吧?
$client = new SoapClient(null,
array('location' =>"http://88.com/pprc/server.php",'uri'=> "http://88.com/")
);
echo $client->say1(2);
echo $client->say("hello world");
像这样是正确的
要么把你写在函数外的 $client做参数传给函数,要么在函数里声明全局变量!