2011-07-17 59 views
0

我想事先表示感谢您的支持。我正在尝试使用PHP编写的ASP.Net编写的Web服务。当我运行代码,我得到这个错误: - HTTP错误:无法打开套接字连接到服务器http://office-server/tempPlace/Service.asmx,错误(10272051):“PHP错误:无法打开与服务器http的套接字连接”PHP

谁能帮我谢谢,这是我写的代码:

<?php 
require_once('nusoap/lib/nusoap.php'); 
$client = new nusoap_client('http://www.aaa.org/tempPlace/Service.asmx?wsdl','wsdl'); 
$err = $client->getError(); 

if($err){ 
    echo $err; 
} 

$params = array('userName' ='edit', 'password' = 'edit'); 
$result = $client->call('GetLastVersion',$params); 

if ($client->fault) { 
    echo 'Fault'. print_r($result); 
} else { 
    // Check for errors 
    $err = $client->getError(); 
    if ($err) { 
     // Display the error 
     echo 'Error'. $err; 
    } else { 
     // Display the result 
     echo 'Result' . print_r($result);  
    } 
} 
?> 
+0

嗨,谢谢,但我可以访问使用C#和VB.net ASP.Net Web服务为什么不能在PHP – miktg

回答

-1

You already asked this question

your code looks fine to me, the problem could be in your network settings, check your firewall and antivirus settings.

+0

嗨谢谢,但我可以访问使用C#和VB.net的ASP.Net Web服务为什么赢得' t在PHP中工作 – miktg

0

功能fsockopen是由你的php.ini禁止。