本文整理汇总了PHP中nusoap_base::setGlobalDebugLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP nusoap_base::setGlobalDebugLevel方法的具体用法?PHP nusoap_base::setGlobalDebugLevel怎么用?PHP nusoap_base::setGlobalDebugLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nusoap_base
的用法示例。
在下文中一共展示了nusoap_base::setGlobalDebugLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
<?php
require_once 'util.php';
require_once '/usr/local/nusoap/lib/nusoap.php';
nusoap_base::setGlobalDebugLevel(0);
$wsdl = new nusoap_client('http://cdmo.baruch.sc.edu/webservices2/requests.cfc?wsdl');
$stations = explode('|', $_REQUEST['stations']);
$params = explode('|', $_REQUEST['params']);
$data = array();
for ($i = 0; $i < count($stations); $i++) {
$result = $wsdl->call('exportSingleParamXML', array('tbl' => $stations[$i], 'numrecs' => '1', 'param' => $params[$i]));
$col2idx = array();
foreach ($result['nds']['data']['r'] as $r) {
$d = array();
// figure out the col mapping
if (count($col2idx) == 0) {
foreach ($r['c'] as $c) {
array_push($col2idx, $c['!v']);
}
} else {
foreach ($r['c'] as $c) {
if (rtrim($c['!v']) != 'null') {
$d[$col2idx[count($d)]] = rtrim($c['!v']);
}
}
}
}
$d['station'] = $stations[$i];
array_push($data, $d);
}
date_default_timezone_set('UTC');
示例2: getClient
protected function getClient()
{
if (!isset($this->client) || !$this->client) {
nusoap_base::setGlobalDebugLevel(0);
$wsdl_path = $this->getWSDLLocation();
$cache = new nusoap_wsdlcache('/tmp', 86400);
$wsdl = $cache->get($url);
if (is_null($wsdl)) {
$wsdl = new wsdl($wsdl_path, '', '', '', '', 5);
$cache->put($wsdl);
}
$client = new nusoap_client($wsdl, 'wsdl');
//$client = new nusoap_client($wsdl_path, true);
$client->decode_utf8 = false;
//$client->setDebugLevel(9);
//$client->clearDebug();
if ($client->getError()) {
throw new Exception("Initialising soap client failed, invalid wsdl?");
}
$this->client = $client;
}
return $this->client;
}