ÓйØphp soap wsdlµÄÎÊÌâ - Web ¿ª·¢ / XML/SOAP
zend studio for Eclipse½¨Á¢µÄÒ»¸öÏîÄ¿£¬½á¹¹È磺
Add.php:
PHP code:
<?php
class Add
{
/**
* Enter discription here...
* @param integer $x
* @param integer $y
* @return integer
*
*/
public function add($x,$y) {
return $x+$y;
}
}
?>
server.php:
PHP code:
<?php
require_once("Add.php");
$server = new SoapServer('test.wsdl');
$server->setClass('Add');
$server->handle();
?>
client.php:
PHP code:
<?php
$client = new SoapClient('test.wsdl');
echo $client->add(2,3);
?>
test.wsdl:
XML code:
<?xml version='1.0' encoding='UTF-8'?>
<!-- WSDL file generated by Zend Studio. -->
<definitions name="test" targetNamespace="urn:test" xmlns:typens="urn:test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="htt
Ïà¹ØÎÊ´ð£º
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
˼·£ºÒªÓÃc#Éú³ÉÒ»¸ö²¥·Å»úµÄ²¥·ÅÁбíµÄxml£¬ÀýÈ磺
<daty datys='2010-04-05' datye='2010-05-01' > //ÕâÊDz¥·ÅµÄÈÕÆÚ¶Î
<time times='01:12:00' timee='02:30:00'> ......
XMLÎļþÄÚÈÝ£º
- <ResList>
<page>0</page>
- <resItem>
<resName>WWW</resName>
</resItem>
- <resItem>
&nb ......
1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
ÈçÌ⣬Ôõôд¸öheadÍ·²¿ ÈÃÒ³Ãæ»º´æ1ÐÇÆÚ¡£
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Äã°ÑÀïÃæµÄʱ¼ä£¬¸Ä³Éµ±Ç°Ê±¼ä¼ÓÉÏÒ»¸öÐÇÆÚ
¼ÇµÃҪת»»³Égmtʱ¼ä
ÎÒÕâÑùдµÄ ²»ÖªµÀÐв»ÐС£
Ò»¸öÐ ......