关于 php webservice 的问题 - PHP / 基础编程
对php不是很了解 写了个简单的例子
现用c#调用php写的 webservice(soap WSDL)iis6.0+php5.2.8
webservice如下
<?php
class WebService
{
public function Logout()
{
//header('Content-type: text/xml;');
return array("LogoutResult"=>array("1"));
}
}
$server = new SoapServer("WebService.wsdl");
$server->setClass("WebService");
$server->handle();
?>
c#如下
WebService ws = new WebService();
return dws.Logout();
错误
客户端发现响应内容类型为“text/html”,但应为“text/xml”。
请求失败,错误信息为:
--
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://sunity.org/"><SOAP-ENV:Body><ns1:LogoutResponse><ns1:LogoutResult><ns1:anyType>1</ns1:anyType></ns1:LogoutResult></ns1:LogoutResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
这种情况有见过的吗?
改写成这样
public function Logout()
{
header('Content-type: text/xml;');
return array("LogoutResult"=>array("1"));
}
也没用
不是该如何修改响应头
iis中自定义HTTP头也不对
错误:客户端发现响应
相关问答:
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......
请问一下各位大虾,我用php做个网页游戏,当然是最垃圾的那种html的,
现在我想把所有玩家和怪物,npc的数据储存,
当然,数据库中当然有,但是我又不想过多的去查询数据库,
比如战斗系统,肯定要先初始化双方数 ......
想把http://www.abc.com/aa/bb/aa.php
重写成http://www.abc.com/aa.php 弄了半天也不知道如何弄~~
这个可以实现么
RewriteRule ^([a-z0-9]+)\/([a-z0-9]+)\/([a-z0-9]+)\.php$ $3.php [L,QSA]
引 ......
PHP中title如何动态显示当前文章的标题?
在title中每篇文章都是显示同样的内容.想让他动态显示.不知道要如何写才能动态显示当前文章的标题呢?
谢谢
PHP中title?没明白,是不是HTML的title啊
如果是的话,你可以 ......
如题
新网的~
不知道哪家好。我用香港主机还行
引用
新网的~
这个好吗?用起来很慢,我现在用的佰网的,http://www.hb666.net/
DreamHost
美国,世界第一流的收费空间
国外空间的话 ......