¹ØÓÚ¡¡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ÖÐ×Ô¶¨Òå£È£Ô£Ô£ÐÍ·Ò²²»¶Ô
´íÎó:¿Í»§¶Ë·¢ÏÖÏìÓ¦
Ïà¹ØÎÊ´ð£º
ʹÓÃPHPµÄexecº¯Êýµ÷ÓÃlinuxµÄshellÃüÁÈçdateÈ¥ÐÞ¸Äʱ¼ä»òshutdownȥʵÏֹػú/ÖØÆô£¬µ«ÊÇ·µ»ØÖµ¶¼ÊÇʧ°ÜµÄ¡£¾¹ý¶à´ÎÊÔÑ飬È϶¨ÊÇûÓÐȨÏÞµÄÎÊÌâ¡£
ËùÒÔ£¬Ð¡µÜÔÚ´ËÇë½Ì¸÷룬ÈçºÎ²ÅÄÜÉèÖÃȨÏÞ£¬µ÷ÓÃlinux shellà ......
ÇëÎÊһϸ÷λ´óϺ£¬ÎÒÓÃphp×ö¸öÍøÒ³ÓÎÏ·£¬µ±È»ÊÇ×îÀ¬»øµÄÄÇÖÖhtmlµÄ£¬
ÏÖÔÚÎÒÏë°ÑËùÓÐÍæ¼ÒºÍ¹ÖÎnpcµÄÊý¾Ý´¢´æ£¬
µ±È»£¬Êý¾Ý¿âÖе±È»ÓУ¬µ«ÊÇÎÒÓÖ²»Ïë¹ý¶àµÄÈ¥²éѯÊý¾Ý¿â£¬
±ÈÈçÕ½¶·ÏµÍ³£¬¿Ï¶¨ÒªÏȳõʼ»¯Ë«·½Êý ......
¸Õ½Ó´¥Õâ¸ö¶«Î÷£¬ÏëÎÊһϸ÷λ¸ßÊÖʵ¼ùÕâ¸öÐèÒªÄÄЩ¹¤¾ß£¨ÎÒÓõÄlinux,dreamweaver£©£¿¾ßÌåÔõôʵÏÖ£¿ÇóÒ»¸ö¼òµ¥ÍêÕûµÄÀý×Ó
ÍøÉÏËÑË÷nusoap
È¥¡°w3ѧУ¡±Ñ§ÏÂxml
²»¹ýÍøÉϱȽÏÄÑÕÒÄÇÖÖÍêÕûµÄÀý×Ó£¬Ö»Óмò ......
<html>
<head>
<title>hello </title>
</head>
<body>
<input type="button" value="Click" onClick=" ......
this->$name=$nam;
Õâ¾ä´úÂëÊÇʲôÒâ˼°¡£¿
ÆäÖÐ->ÓÖÊÇʲôÒâ˼ÄØ¡¢
лл¸ßÊÖÖ¸µã£¡
¶ÔÏó->ÊôÐÔ=±äÁ¿
²»¹ýÄãºÃÏñд´íÁË....
$this->num=$num; ÕâÑùµÄ°É
$this->num=$num; ......