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

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=utf-8" />
</head>
<body>
<?php
$a='abcdãÉLOVE¾ü¶ù';//²âÊÔµÄ×Ö·û´®£¬°üº¬ÖÐÎÄÎ÷ÎÄ
//ÏÂÃæµÄ²âÊÔÊä³öΪÉÏ£¬ÒòΪÔÚ±àÂëΪutf-8ʱ£¬Ò»¸öÖÐÎÄ×Ö·ûÕ¼3¸ö³¤¶È
//echo strlen('ãÉ'); 
$b='';
$i=0;
while($i<strlen($a))
{
    if(ord(substr($a,$i,1))>0xa0)//ordº¯ÊýÅжϸÃ×Ö·û´®ÊÇ·ñÊÇÖÐÎÄ
    {
       $b=substr($a,$i,3).$b;//Õâ¾äºÜÖØÒª£¬µ¹Ðò£¡
       $i+=3;
    }
    else
    {
      $b=substr($a,$i,1).$b;
      $i++;
    }
}
echo $b;
?>
</body>
</html>
---------------------------------------------------------------------------
°´ÉÏÃæµÄ³ÌÐò¿ÉÒÔʵÏÖÄæÐò£¬¸ã¶¨£¡ºÇºÇ


Ïà¹ØÎĵµ£º

PHP ÖÆ×÷ͨѶ¼£¨¶þ£©

ÉÏһƪÖУ¬¼òµ¥Ð´Á˸öInput.php £¬ µ«ÉúÈÕÄÇÒ»À¸Òª×Ô¼ºÊÖ¶¯ÊäÈëд£¬±È½ÏÂé·³£¬ËùÒÔÕâÀïÓõ½Ò»¸öJSÎļþ£¬¿ÉÒÔÑ¡ÔñÈÕÆÚ
µã»÷ÏÂÔØÕâ¸öjsÎļþ
ÔÚInput.phpÎļþ×¶ËÒýÓÃÕâ¸öJSÎļþ
<script type="text/javascript" src="calenderJS.js"></script>
½«ÉúÈÕµÄÊäÈë¿ò¸Ä³É
<input name="birthday" type="text" ......

php ÑéÖ¤Âë×ܽá

´úÂëÈçÏÂ:
    <?php
       /*   ÍøÕ¾ÑéÖ¤Âë³ÌÐò
        *   ÔËÐл·¾³£º PHP5.0.18 ϵ÷ÊÔͨ¹ý
        *   ÐèÒª gd2 ͼÐοâÖ§³Ö£¨PHP.INIÖÐ php_gd2.dll¿ªÆ ......

windows2003+iis6+php+mysql ·þÎñÆ÷ÅäÖÃ

ÔÚÍøÉÏ¿´Á˺ܶà¹ØÓÚwindows2003+iis6+php+mysql ·þÎñÆ÷ÅäÖõÄÎÄÕ£¬´óÌåÉ϶¼ÊÇ»¥Ïà³­Ï®£¬²»¹ýһЩ¹«¹²µÄÐÅÏ¢»¹ÊǺÜÕýÈ·µÄ£¬µ«ÊÇÕë¶ÔһЩÌرðµÄ»úÆ÷»òÕßÒòΪ¸öÈ˲»Í¬µÄÅäÖÃ×ܲ»ÄÜ°´ÕÕÎÄÕµÄÄÚÈݲÙ×÷³É¹¦£¬ÏÂÃæ˵һÖÖ½ÏΪ¼òµ¥µÄ²Ù×÷·½·¨£¬²½ÖèÈçÏ£º
1.iis°²×°£¨ÂÔ£©
2.ÏÂÔØAppServ²¢°²×°
3.ÔÚc:\½¨php5Îļþ¼Ð£¬È»ºóÔÙphp5 ......

PHP bug??global·¢ÏÖµÄÎÊÌâ

ÈçÏÂphp´úÂë
<?php
$type='a';
$target='type';
$a=array(1,2,3);
a($target);
function a($type)
{
    global $$type;
    var_dump($$type);
}
?>
Ô¤¼ÆÊä³öµÄÊÇstring(1)”a”
¿ÉÊǽá¹ûÊÇ
Notice: Undefined variable: a in D:\web\global.php on ......

[ת]PHPÖÐÎÄÂÒÂëµÄ³£¼û½â¾ö·½·¨×ܽá

¡¡PHPÖÐÎÄÂÒÂëÊÇPHP¿ª·¢Öеij£¼ûÎÊÌâÖ®Ò»¡£PHPÖÐÎÄÂÒÂëÓÐʱ·¢ÉúÔÚÍøÒ³±¾Éí£¬ÓÐЩ²úÉúÔÚÓÚMySQL½»»¥µÄ¹ý³ÌÖУ¬ÓÐʱÓë²Ù×÷ϵͳÓйء£ÏÂ
Ãæ½øÐÐÒ»·¬×ܽᡣ
¡¡¡¡Ò».Ê×ÏÈÊÇPHPÍøÒ³µÄ±àÂë
¡¡¡¡1. phpÎļþ±¾ÉíµÄ±àÂëÓëÍøÒ³µÄ±àÂëӦƥÅä
¡¡¡¡a. Èç¹ûÓûʹÓÃgb2312±àÂ룬ÄÇôphpÒªÊä³öÍ·£ºheader(“Content-Type: text/html; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ