Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Á¬½ÓMysqL

Á¬½Ó£º
$conn=mysql_connect ("localhost:3306", "username", "password");
mysql_select_db("DBname");
¶Á£º
$exec="select * from stu";
$result=mysql_query($exec);
while($rs=mysql_fetch_object($result))
{
    echo $rs->id." & ......

php·ÖÒ³TEST£¬×Ô¼ºÐ´Ò»ÏÂ

<?
include 'conn.php';
$_pagenob=10; //ÿҳ¹æ¶¨µÄÐÅÏ¢ÊýÄ¿
//»ñÈ¡µ±Ç°Ò³
if(isset($_GET["page"]))
{
$_page = intval( $_GET['page'] );
}
else
{
$_page=1;
}
//²éѯÊý¾Ý×ÜÊý
$_query="select count(*) as acount from news";
$_result=mysql_query($_query);
$_row=mysql_fetch_row($_result);
......

PHPÔÚÆóÒµ»·¾³ÏµÄÊÊÓÃÐÔ

¡¡¡¡ËäÈ»PHPÊÇWebÓ¦Óÿª·¢ÖÐ×î¹ã·ºÊ¹ÓõĻ·¾³£¬µ«Ëü»¹ÊÇÒ»¶È±»ÈÏΪÎÞÔµÆóÒµ¼¶¿ª·¢¡£InfoQ×éÖ¯ÁËÒ»¸öÐéÄâ×ù̸С×éÀ´ÌÖÂÛÓïÑÔ/ƽ̨µÄÑݱ估PHPÔÚÆóÒµ»·¾³ÏµÄÊÊÓÃÐÔ¡£
¡¡¡¡Zeev Suraski£¬Zend Technologies¹«Ë¾´´Ê¼ÈË£¬¸Ã¹«Ë¾Ö÷Òª¹Ø×¢PHPµÄ½øÕ¹¡£
¡¡¡¡Rob Nicholson£¬¸ß¼¶¼¼ÊõÑÐÔ±, ÔøÎªIBM±àд¹ý³ÌÐòÉè¼ÆÓïÑÔÔËÐÐʱ¡£
¡¡¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ