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

php ͼƬÑéÖ¤Âë

ͼƬÑéÖ¤ÂëµÄÔ­ÀíÊÇ·ÀÖ¹¶ñÒâ×¢²á£¬ÊµÏÖ·½·¨
ÑéÖ¤Â룺<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();">¿´²»Ç壬»»Ò»ÕÅ</a>
 
code/middle.phpÖеĴúÂ룺
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030" />
<title>Insert title here</title>
</head>
<body style="margin:0; padding:0">
  <img src="code.php" />
       
</body>
</html>
 
code.phpÖеĴúÂ룺
<?php
/*---------------×ÏÉ«·çÁå--------------
*  Info:ÑéÖ¤ÂëÉú²ú³ÌÐò£»
*  Autore: gb2312
*  Time £º 10-1-7 13:10;
*-------------------------------------*/
session_start();
function yanzheng()
{
         $shumu = 4;
         define("shumu","$shumu" );
         $vchar =array( 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z);
         for($i=0; $i<shumu; $i++)
         {
          
            $suiji=$suiji.$vchar[mt_rand(0,61)];
          
         }
         if (strlen($suiji)!=4)
         yanzheng();
     &n


Ïà¹ØÎĵµ£º

php½âÎöxmlʾÀý

<!-- xml ¸ñʽ
<books>
<book id='1001'>
<author>andylin</author>
<title>c language</title>
<publisher id="aaa">O'Reilly</publisher>
</book>

<book id='1002'>
<author>congfeng</author>
<t ......

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 $_SERVERº¯ÊýÖÐQUERY_STRINGºÍREQUEST_URI

$_SERVER´æ´¢µ±Ç°·þÎñÆ÷ÐÅÏ¢£¬ÆäÖÐÓм¸¸öÖµÈç$_SERVER["QUERY_STRING"]£¬$_SERVER["REQUEST_URI"]£¬$_SERVER["SCRIPT_NAME"]ºÍ$_SERVER["PHP_SELF"]³£³£ÈÝÒ×»ìÏý£¬ÒÔÏÂͨ¹ýʵÀýÏê½â$_SERVERº¯ÊýÖÐQUERY_STRING£¬REQUEST_URI£¬SCRIPT_NAMEºÍPHP_SELF±äÁ¿Çø±ð£¬ÕÆÎÕÕâËÄÕßÖ®¼äµÄ¹ØÏµ£¬±ãÓÚÔÚʵ¼ÊÓ¦ÓÃÖÐÕýÈ·»ñÈ¡ËùÐèÒªµÄÖµ
1£ ......

ÕýÔò±í´ïʽÔÚ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ºÅ