Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何从PHP调用.NETWeb服务_C#_Php_.net_Web Services - Fatal编程技术网

C# 如何从PHP调用.NETWeb服务

C# 如何从PHP调用.NETWeb服务,c#,php,.net,web-services,C#,Php,.net,Web Services,.NETWeb服务代码 [WebMethod] public string asd(){ return "asd"; } PHP代码: <?php require 'lib/nusoap.php'; $client = new SoapClient("http://localhost/nos/WebSite/Service.asmx?WSDL"); $error = $client->getError(); if ($error) { die("client c

.NETWeb服务代码

[WebMethod]
public string asd(){
    return "asd";
}
PHP代码:

<?php
require 'lib/nusoap.php';

$client = new SoapClient("http://localhost/nos/WebSite/Service.asmx?WSDL");

$error = $client->getError();
if ($error) {
    die("client construction error: {$error}\n");
}

$answer = $client->call('asd');
print $answer;
$error = $client->getError();
?> 


我搜索了很多并应用了所有东西,但我的代码不起作用,它只显示了一个白色页面。

你的
Web.config
是什么样子的?对不起,我不太清楚你在说什么你遇到了什么问题?