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

phpʵÏÖÌæ»»UTF

 ÅúÁ¿È¥³ýBOMµÄ³ÌÐò
function
 replace_utf8bom(
$str
)  
{  
    $charset
[1] = 
substr
(
$str
,0,1);  
    $charset
[2] = 
substr
(
$str
,1,1);  
    $charset
[3] = 
substr
(
$str
,2,1);  
    if
 (ord(
$charset
[1]) == 239 && ord(
$charset
[2]) == 187 && ord(
$charset
[3]) == 191)  
    {  
        return
 
substr
(
$str
,3);  
    }  
    else
  
    {  
        return
 false;  
    }  

ºÜÃ÷ÏÔ£¬Õâ¾ÍÊÇÇ°ÃæÈý¸ö×Ö·ûÊǹ̶¨µÄÔ­Òò£¬µ±È»¿ÉÒÔÕâÑùÅжÏÁË¡£¡£¡£Ëµ°×Á˺ܼòµ¥£¬µ«Èç¹û²»ÖªµÀ¾ÍÕæµÄºÜÍ´¿àÁË¡£Ë³±ã˵һÏ£¬ËüÀ´×Ô£ºhttp://www.phptext.net/technology.php?vid=53


Ïà¹ØÎĵµ£º

PHP Security for Deployers

PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......

PHPµÄÈýµã¾«»ª½éÉÜ

 ÎÒ·¢ÏֺܶàµÄPHP³ÌÐòÔ±£¬ÓÈÆäÊÇѧϰ»¹²»ÊǺܾõ쬶¼²»ÖªµÀPHPµÄ¾«»ªËùÔÚ¡£Perlµ±ÄêÈçºÎÔÚÉ̽ç³öÃû£¿ÆäÇ¿´óµÄÕýÔò±í´ïʽ¡£¶øPHPÄØ£¿ËûÊÇÒ»ÃÅ´ÓUnixÏ·¢Õ¹ÆðÀ´µÄÓïÑÔ£¬µ±È»Ò²¾Í¼Ì³ÐÁËPerlµÄºÜ¶àÌØµã£¬Í¬Ê±CµÄÓŵ㶼ÓС£¿ìËÙ¡¢¼ò½à¡¢Ã÷ÁË£¬ÓÈÆäÊÇC³ÌÐòÔ±£¬PHPÊÇÖÁ°®£¬ÎÒ¾ÍÊÇÉî°®×Å“PHP”£¨¶¼ÍüÁËÅ®ÓÑÁË:)£©¡ ......

PHP Á¬½Ómysql

 <?
$_mysqlhost="localhost";
$_mysqluser="root";
$_mysqlpass="";
$_mysqldata="mydata";
$_connect=mysql_connect($_mysqlhost,$_mysqluser,$_mysqlpass) or die ("´íÎó".mysql_error());
mysql_query("SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary", $ ......

phpµÄyii¿ò¼Ü¹ØÁª²éѯ

¼ÙÈçÓÐÁ½¸ö±í£º user  ºÍ articles ±í
½á¹¹£º
user£º £¨id, name£©
articles: (id,user_id,title,content)
ÆäÖÐuser.id ºÍ user_id ¹ØÁª
ÔÚuserµÄ modelÖÐµÄ relations·½·¨ÀïÃæ¼Ó£º
return array('articles'=>array(self::HAS_MANY,'articles','user_id'));
ÔÚarticlesµÄ modelÖÐµÄ relations·½·¨ÀïÃæ¼Ó£º
......

ÔÚWindows XPÏÂÅäÖÃPHPºÍApache»·¾³

    ÔÚwindows²Ù×÷ϵͳÅäÖÃPHP»·¾³£¬¿ÉÒÔÓÃIIS×öÓ¦Ó÷þÎñÆ÷£¬Ò²¿ÉÒÔʹÓÃApache×öÓ¦Ó÷þÎñÆ÷¡£±¾ÎĽéÉÜÔÚWindows XP²Ù×÷ϵͳÏÂÅäÖÃPHPºÍApache»·¾³¡£
    ×¼±¸¹¤×÷£º
    1¡¢ÔÚhttp://windows.php.net/download/ÏÂÔØPHP³ÌÐò°ü£¬ÒòΪÓÃApache×öÓ¦Ó÷þÎñÆ÷£¬Ñ¡ÔñÓÃVC6±àÒëµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ