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
/* ÍøÕ¾ÑéÖ¤Âë³ÌÐò
* ÔËÐл·¾³£º PHP5.0.18 ϵ÷ÊÔͨ¹ý
* ÐèÒª gd2 ͼÐοâÖ§³Ö£¨PHP.INIÖÐ php_gd2.dll¿ªÆ ......
·½·¨1£ºerror_reporting (E_ALL ^ E_WARNING);
session_start();
·½·¨2£ºerror_reporting (E_ALL & ~E_NOTICE);
if (!isset($_SESSION)) {
session_start();
};
·½·¨3£º¸Äphp.ini ÖÐerror_reporting ......
¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔÀ´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......
$pagesize=10; //ÉèÖÃÿһҳÏÔʾµÄ¼Ç¼Êý
$c("localhost","root",""); //Á¬½ÓÊý¾Ý¿â
$rs=mysql_query("select count(*) from tb_product",$conn); //È¡µÃ¼Ç¼×ÜÊý$rs
$myrow = mysql_fetch_array($rs);
$numrows=$myrow[0];
Ɍ ......