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

php ×Ö·û´®º¯Êý

Ò»¡¢×Ö·û´®»ù´¡º¯Êý
ltrim: È¥³ýÁ¬Ðø¿Õ°×¡£
trim: ½ØÈ¥×Ö·û´®Ê×βµÄ¿Õ¸ñ¡£
Chop: º¯Êý´Ó×Ö·û´®µÄÄ©¶Ë¿ªÊ¼É¾³ý¿Õ°××Ö·û»òÆäËûÔ¤¶¨Òå×Ö·û¡££¨rtrim±ðÃû£©
<?php
$str = "Hello World!\n\n";
echo $str;
echo chop($str);
?>
Êä³ö£º
Hello World! Hello World!
htmlspecialchars(string,quotestyle,character-set): º¯Êý°ÑһЩԤ¶¨ÒåµÄ×Ö·ûת»»Îª HTML ʵÌå¡£
Ô¤¶¨ÒåµÄ×Ö·ûÊÇ£º
& £¨ºÍºÅ£© ³ÉΪ &amp;
" £¨Ë«ÒýºÅ£© ³ÉΪ &quot;
' £¨µ¥ÒýºÅ£© ³ÉΪ &#039;
< £¨Ð¡ÓÚ£© ³ÉΪ &lt;
> £¨´óÓÚ£© ³ÉΪ &gt;
Àý×Ó
<html>
<body>
<?php
$str = "John & 'Adams'";
echo htmlspecialchars($str, ENT_COMPAT);
echo "<br />";
echo htmlspecialchars($str, ENT_QUOTES);
echo "<br />";
echo htmlspecialchars($str, ENT_NOQUOTES);
?>
</body>
</html>ä¯ÀÀÆ÷Êä³ö£º
John & 'Adams'
John & 'Adams'
John & 'Adams'Èç¹ûÔÚä¯ÀÀÆ÷Öв鿴Դ´úÂ룬»á¿´µ½ÕâЩ HTML£º
<html>
<body>
John &amp; 'Adams'<br />
John &amp; &#039;Adams&#039;<br />
John &amp; 'Adams'
</body>
</html>
htmlentities(string,quotestyle,character-set): ½«ËùÓеÄ×Ö·û¶¼×ª³É HTML ×Ö·û´®¡£
Àý×Ó
<html>
<body>
<?php
$str = "John & 'Adams'";
echo htmlentities($str, ENT_COMPAT);
echo "<br />";
echo htmlentities($str, ENT_QUOTES);
echo "<br />";
echo htmlentities($str, ENT_NOQUOTES);
?>
</body>
</html>ä¯ÀÀÆ÷Êä³ö£º
John & 'Adams'
John & 'Adams'
John & 'Adams'Èç¹ûÔÚä¯ÀÀÆ÷Öв鿴Դ´úÂ룬»á¿´µ½ÕâЩ HTML£º
<html>
<body>
John &amp; 'Adams'<br />
John &amp; &#039;Adams&#039;<br />
John &amp; 'Adams'
</body>
</html>
nl2br: ½«»»ÐÐ×Ö·ûת³É <br>¡£
strcmp(string1,string2)º¯Êý±È½ÏÁ½¸ö×Ö·û´®¡£
¸Ãº¯Êý·µ»Ø£º
0 - Èç¹ûÁ½¸ö×Ö·û´®ÏàµÈ
<0 - Èç¹û string1 СÓÚ string2
>0 - Èç¹û string1 ´óÓÚ string2 
¶þ¡¢×Ö·û´®´óСдת»»º¯Êý
strtolower: ×Ö·û´®È«×ªÎªÐ¡Ð´¡£
strtoupper


Ïà¹ØÎĵµ£º

fedoraÏÂphp»·¾³ÅäÖÃ

±àÒë°²×°
apache
ÏÂÔØapache°²×°
=============================
ÎÒ°ÑËû°²×°ÔÚ/usr/local/apacheĿ¼ÏÂ
tar -zxvf apacheÎļþ
½øÈë½âѹºóµÄĿ¼£¬ÅäÖÃ./configure --prefix=/usr/local/apache -enable-mods-shared=all -enable-so -enable-rewrite
make
make install
È»ºóÆô¶¯/usr/local/apache/bin/apachectl sta ......

phpµ÷Óô洢¹ý³Ì

Àý×Ó³ÌÐò¡£
<?php
    define('CLIENT_MULTI_RESULTS', 131072);
    $link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
    mysql_select_db("vs") or die("Could not select database");
?> ......

PHP³£ÓÃÕýÔò±í´ïʽ

    Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ
£º [\u4e00-\u9fa5]
    Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)
£º ["\x00-\xff]
    Ó¦Ó㺼ÆËã×Ö·û´®µÄ³¤¶È
£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
    String.prototype.len=function(){return
th ......

PHPͨ¹ýsession id ʵÏÖsession¹²ÏíºÍµÇ¼ÑéÖ¤[ת]

http://edu.codepub.com/2010/0131/20248.php
ÆäʵÕâ¸öÓ¦¸Ã²»ËãÊÇÒÉÄÑÎÊÌ⣬¾ÍÊÇphpÖÐÓàsessionidµÃµ½sessionµÄÖµ£¬ÒòΪµÄÈ·ºÜ¼òµ¥£¬Ö»ÊÇ¿ÉÄÜ´ó¼ÒƽʱÓò»µ½ËùÒÔûÓÐ×¢Òâµ½°ÕÁË¡£
 
ÏÈ˵˵£¬Õâ¸ö»úÖƵÄÓÃ;°É£¬µ½ÏÖÔÚΪֹսµØÖªµÀÕâ¸ö»úÖÆÓÐÁ½¸ö·½ÃæµÄÓÃ;£º
ÆäʵÕâ¸öÓ¦¸Ã²»ËãÊÇÒÉÄÑÎÊÌ⣬¾ÍÊÇphpÖÐÓà sessi ......

PHPÎÞÏÞ·ÖÀàµÄ¾ßÌåÔ­Àí·ÖÎö

¡¡¡¡¶ÔÓÚ³õѧPHPÓïÑÔµÄÅóÓÑÀ´Ëµ£¬PHP»¹ÓкܶණÎ÷ÐèÒªÉîÈëµÄ̽¾¿¡£Ö»ÓÐÔÚ²»¶ÏµÄÎÊÌâ´¦ÀíÖвÅÄÜÕÆÎÕÆäÖеÄÕæÖ¿¡£Ê²Ã´ÊÇPHPÎÞÏÞ·ÖÀàÄØ?¾ÍÏñwindowsÏÂн¨Ò»¸öÎļþ¼Ð£¬ÔÚн¨µÄÎļþ¼ÐÏÂÓÖ¿ÉÒÔн¨Ò»¸öÎļþ¼Ð£¬ÕâÑùÎÞÏÞÑ­»·ÏÂÈ¥£¬ÎÞÏÞ·ÖÀàÒ²ÊÇÕâÑù£¬¸¸Àà¿ÉÒÔ·Ö³öËü×ÓÀ࣬×ÓÀàÓÖ¿ÉÒÔ·Ö³öËüµÄ×ÓÀ࣬ÕâÑùÒ»Ö±ÎÞÏÞÑ­»·ÏÂÈ¥¡£
¡¡¡¡Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ