各位大大,小弟我询问一个问题,我在本地调试好php访问WEBSERVICE接口已经成功,并且可以传递相关参数,但是我将程式放置到服务器端之后就出现
网站无法显示该页面
HTTP 500 内部服务错误
最可能的原因是:
•该网站正在进行维护。
•该网站有程序错误。
您可以尝试以下操作:
重新键入地址。
返回到上一页。
更多信息
大家知道这是什么问题吗 ??读写权限???
网站无法显示该页面
HTTP 500 内部服务错误
最可能的原因是:
•该网站正在进行维护。
•该网站有程序错误。
您可以尝试以下操作:
重新键入地址。
返回到上一页。
更多信息
大家知道这是什么问题吗 ??读写权限???
也把lib文件夹放在运行文件的同一目录下了。
除了可能是soap扩展没开之外,还可能是你的程序中的语法错误。
error_reporting(E_ALL);
开启后,看是否有错误提示。
下面没有执行的是什么内容?
echo "1234";header("Content-Type: text/html;charset=utf-8");
require_once("lib/nusoap.php");//调用一个开源的类 下载downloaderror_reporting(E_ALL);
$client = new soapclient('http://hr.pim-cs.com/WebService/IntegralInterface.asmx?wsdl', true);
echo "abc";
$err = $client->getError();
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = ture;
$client->xml_encoding = 'utf-8';
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Doc/lit parameters get wrapped
//$param = array('CityName' => 'dalian','CountryName' => 'china');
$json='{
"Request":{
"Header":{
"IFCode":"接口标识",
"CorpCode":"客户代码",
"SysCode":"kongRun_BasicCode",
"Account":"用户名",
"Pwd":"密码 ",
},
"Body":{
"Integral":"1",
"MobilePhone":"手机号码"
}
}}';
$param = array('Json' => $json);
//$param=json_decode($json);
$result = $client->call('MemberAddIntegral', array('parameters' => $param), '', '', false, true,'document','encoded');
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>
而 nusoap.php 不是能适应高版本php的!有没有,我还不知道。我只用soap扩展Deprecated: Assigning the return value of new by reference is deprecated in nusoap.php on line 7381
Warning: Creating default object from empty value in nusoap.php> on line >75