php soap³õʶ
´ò¿ªphp.iniµÄsoapÀ©Õ¹
server.php
<?php
class math{
/**
* ¼Ó·¨
*
* @param integer $a
* @param integer $b
* @return integer
*
*/
public function add($a, $b){
return $a + $b;
}
}
$server = new SoapServer('http://localhost/math.wsdl',array('soap_version' => SOAP_1_2));
$server->setClass("math");
$server->handle();
?>
client.php
<?php
$client = new SoapClient('http://localhost/math.wsdl');
$result = $client->add(1,3);
echo $result;
?>
ÆäÖÐhttp://localhost/math.wsdlÎļþÓÉzend studioÉú³É
Ïà¹ØÎĵµ£º
<!-- xml¸ñʽ
<foo xmlns="test">
<bar attr='a'></bar>
<bar attr='b'></bar>
<bar attr='c'></bar>
</foo>
-->
<?php
$dom = new DOMDocument();
if (!$dom->load('attr.xml'))
{
echo "load books.xml failed!<br>";
re ......
$_SERVER´æ´¢µ±Ç°·þÎñÆ÷ÐÅÏ¢£¬ÆäÖÐÓм¸¸öÖµÈç$_SERVER["QUERY_STRING"]£¬$_SERVER["REQUEST_URI"]£¬$_SERVER["SCRIPT_NAME"]ºÍ$_SERVER["PHP_SELF"]³£³£ÈÝÒ×»ìÏý£¬ÒÔÏÂͨ¹ýʵÀýÏê½â$_SERVERº¯ÊýÖÐQUERY_STRING£¬REQUEST_URI£¬SCRIPT_NAMEºÍPHP_SELF±äÁ¿Çø±ð£¬ÕÆÎÕÕâËÄÕßÖ®¼äµÄ¹Øϵ£¬±ãÓÚÔÚʵ¼ÊÓ¦ÓÃÖÐÕýÈ·»ñÈ¡ËùÐèÒªµÄÖµ
1£ ......
http://blog.csdn.net/hahawen/archive/2004/05/01/20692.aspx
Èý¡¢ÊµÏÖÄãµÄMode²ã
Model²ã£¬¾ÍÊÇMVCģʽÖеÄÊý¾Ý´¦Àí²ã£¬ÓÃÀ´½øÐÐÊý¾ÝºÍÉÌÒµÂß¼µÄ×°·â£¬½øÐÐËûµÄÉè¼ÆµÄʱºòÉè¼Æµ½Èý¸ö¸ö¸ÅÄî:
------ModelÀà¡£ÊÇʵÌåÀà¡£ÓÃÀ´±£´æÊý¾Ý¿â±í¸ñµÄÖÐÒ»Ìõ¼Ç¼µÄËùÓÐ×ֶεÄÊý¾Ý¡£²¢ÇÒ¿ÉÒÔÑéÖ¤ÕâÌõ¼Ç¼Êý¾ÝµÄÍêÕûÐÔ¡£
------ ......
ͼƬÑéÖ¤ÂëµÄÔÀíÊÇ·ÀÖ¹¶ñÒâ×¢²á£¬ÊµÏÖ·½·¨
ÑéÖ¤Â룺<input type="text" name="yanzhengma" />
<iframe src="code/middle.php" height="20px" width="65px" frameborder="0" id="chkimg" scrolling="no" style=" margin-top:5px">
</iframe>
<a href="javascript:chkimg.location.reload(); ......