Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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Éú³É


Ïà¹ØÎĵµ£º

PHP»º´æ´úÂë

PHP»º´æ´úÂë
ºÃµÄÒ³Ãæ»º´æ´úÂ룬¿ÉÒÔ¼õÇáCPUºÍMYSQL¸ºµ£¡£Ê¹ÓÃǰ£¬ÏÈÔÚ¸ùĿ¼´´½¨“cache”Îļþ¼Ð£¬È»ºóÔËÐÐ1.php£¬µÚÒ»´ÎÔËÐк͵ڶþ´ÎÔËÐÐËٶȲîÒìºÜ´ó¡£»¶Ó­ÊìϤPHPµÄÅóÓÑʹÓúÍÌáÒâ¼û¡£
ʹÓ÷½·¨:(Çë±£´æÎªtemp.php)
 <?php
include('arrcache.php');
$cache = new ArrCache('cache',5,'txt');
......

php»ñÈ¡xmlÊôÐÔÖµ

<!-- 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 ......

php gettext·½Ê½ÊµÏÖUTF 8¹ú¼Ê»¯¶àÓïÑÔ(i18n)


½ü
À´Ëæ×Åi18n(¹ú¼Ê»¯)µÄÖð½¥±ê×¼»¯£¬ÎÒÒ²À´½²Ò»½²ÔÚPHPÖÐÈçºÎʵÏÖ¹ú¼Ê»¯Ö§³Ö¡£¸úÆäËû³ÌÐòÓïÑÔÒ»Ñù£¬ÔÚ PHP Ò²¿ÉÒÔÀûÓà gettext
Ì×¼þд×÷ i18n ³ÌÐò£¬ÊµÏÖ NLS(Native Language Support) ¹ú¼Ê»¯Ö§³Ö£¬¾ßÌåÇë²Î¿¼¹Ù·½Îĵµ(
http://www.gnu.org/software/gettext/manual/gettext.html
)
ÕâÀïÎÒÃÇÖ÷Òª½éÉÜwindowƽ̨ÏÂÊ ......

phpѧϰ±Ê¼Ç£¨13£©:PHP+MYSQL¼òµ¥·ÖÒ³

conn.php
<?php
/*
 * Created on 2010-1-6
 * Author:CHAUVET
 * Function:Á¬½Ó×Ö·û´®
 */
 $conn=@mysql_connect("localhost","root","")or die("Á¬½ÓÊý¾Ý¿â³ö´í£¡");
 mysql_select_db("newdb",$conn);
 mysql_query("set names 'gb2312'");
 function ReplaceSom ......

ÕýÔò±í´ïʽÔÚphp£¬java£¬javascriptÖзֱðÓ¦ÓÃ

ÔÚjavascriptÖÐÓ÷¨¾ÙÀý
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
ÔÚphpÖÐÓ÷¨¾ÙÀý
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
ÔÚjavaÖÐÓ÷¨¾ÙÀý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ