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

PHP С¼¼ÇÉ

=================================
mb_substr($str, 0, 1, "gbk");
Èç¹ûÌṩÁ˵ÚËĸö²ÎÊý£¬php»á½âÎöÕâ¸ö²ÎÊý
1. ½«Õâ¸ö²ÎÊýת»»³É×Ö·û´®.
2. µ÷ÓÃmbfl_name2no_encoding»ñµÃ±àÂëÆ÷ÐòºÅ
3. µÚ¶þ²½»áµ÷ÓÃmbfl_name2encoding£¬Õâ¸öº¯ÊýÔÚÑ­»·ÖÐʹÓÃÁËstrcasecmp
strcasecmpÊǺöÂÔ´óСдµÄ×Ö·û´®Æ¥Å䣬ÐÔÄܺܵͣ¬
¶øÇÒ£¬Èç¹ûµÚËĸö²ÎÊýÌṩµÄ ±àÂëÃû×Ö ²»¹æ·¶£¬»áÔì³É±ê×¼Ãû×ÖÁбíÖÐÕÒ²»µ½
»¹»á×ö½øÒ»²½µÄ³¢ÊÔ£¬´ÓMIME charset nameÖÐÑ°ÕÒ£¬Èç¹û»¹ÊÇÕÒ²»µ½
»á¼ÌÐø³¢ÊÔ£¬Í¨¹ý±ðÃûÀ´²éÕÒ£¬Õâ¸ö¹ý³ÌÊÇÏ൱ÂýµÄ£¬¼ÙÈçÓÐ20ÖÖ±àÂ룬ÿÖÖÓÐ10¸ö±ðÃû
¾ÍÒª´Ó20*10¸ö×Ö·û´®ÖУ¬²éÕÒ³öÆ¥ÅäµÄ£¬»¹ÊDz»Çø·Ö´óСдµÄÆ¥Å䣬Ï൱µÄÂý
ËùÒÔ£¬¾¡Á¿Ê¹ÓøúÄÚ²¿±àÂëÒ»ÖµıàÂ룬Èç¹û²»ÄÜ£¬±àÂëÃû×ÖÒ»¶¨ÒªÐ´µÄ¹æ·¶
½â¾ö·½°¸£º
mb_internal_encoding("gbk");
for($i = 0; $i < 100000; $i ++){
    $a = mb_substr($str, 0, 1);
}
=================================
ÎÒÃǾ­³£»áÓõ½file_get_contentsº¯Êý,ÓÃÓÚץȡ±ðÈËÍøÕ¾µÄÐÅÏ¢,ÖÆ×÷¼òµ¥µÄ²É¼¯Æ÷,µ«ÊÇÔÚʹÓÃfile_get_contentsº¯ÊýµÄʱºò£¬¾­³£»á³öÏÖ³¬Ê±µÄ´íÎó£¬ÕâÀï½éÉÜÁ½ÖÖ½â¾ö°ì·¨£º
Ò»¡¢Ôö¼Ó³¬Ê±µÄʱ¼äÏÞÖÆ
ÕâÀïÐèҪעÒ⣺set_time_limitÖ»ÊÇÉèÖÃÄãµÄPHP³ÌÐòµÄ³¬Ê±Ê±¼ä£¬¶ø²»ÊÇfile_get_contentsº¯Êý¶ÁÈ¡URLµÄ³¬Ê±Ê±¼ä¡£
ÎÒÒ»¿ªÊ¼ÒÔΪset_time_limitÒ²ÄÜÓ°Ïìµ½file_get_contents£¬ºóÀ´¾­²âÊÔ£¬ÊÇÎÞЧµÄ¡£ÕæÕýµÄÐÞ¸Äfile_get_contentsÑÓʱ¿ÉÒÔÓÃresource $contextµÄtimeout²ÎÊý£º
´úÂëÈçÏÂ:
$opts = array(
'http'=>array(
'method'=>”GET”,
'timeout'=>60,
)
);
$context = stream_context_create($opts);
$html =file_get_contents('http://www.phpzixue.cn', false, $context);
fpassthru($fp);
¶þ¡¢Ò»´ÎÓÐÑÓʱµÄ»°ÄǾͶàÊÔ¼¸´Î
ÓÐʱºòʧ°ÜÊÇÒòΪÍøÂçµÈÒòËØÔì³É£¬Ã»Óнâ¾ö°ì·¨£¬µ«ÊÇ¿ÉÒÔÐ޸ijÌÐò£¬Ê§°ÜʱÖØÊÔ¼¸´Î£¬ÈÔȻʧ°Ü¾Í·ÅÆú£¬ÒòΪfile_get_contents()Èç¹ûʧ°Ü½«·µ»Ø FALSE£¬ËùÒÔ¿ÉÒÔÏÂÃæÕâÑù±àд´úÂ룺
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
$cnt=0;
while($cnt < 3 && ($str=@file_get_contents('http://www.phpzixue.cn'))===FALSE) $cnt++;
=========================================
´úÂëÁ¿Í³¼Æ
ͳ¼Æ.phpºÍ.htmÎļþ  ÐèÒªµ¥´ÊºÍ×Ö·ûÐÅÏ¢£¬°Ñwc -lµÄ-lÈ¥µô
find path_to_source -type f -name


Ïà¹ØÎĵµ£º

phpËæ»úÊýrand(),mt_rand()¼ò˵

phpÉú³ÉËæ»úµÄº¯ÊýÓÐrand()£¬mt_rand()¡£ÕâÁ©º¯Êý¶ÔÓ¦µÄÖÖ×Óº¯Êýsrand(),mt_srand()¡£
ÔÚphp 4.2.0֮ǰÔÚµ÷ÓÃËæ»úº¯Êý֮ǰµÃÏÈÉèÖÃÖÖ×Óº¯Êý£¬²»È»Éú³ÉµÄÊý¶¼ÊÇΨһµÄ¡£
È磺
4.2.0°æ±¾Ö®Ç°£º
<?
srand((double)microtime()*1000000); //²úÉúËæ»úÖÖ×Óseed
$randval = rand(0,100); //ÔÚ0ºÍ100Ö®¼äÈ¡Ò»¸ ......

PHPÂëÅ©½ø»¯Ê·5

1.ËùÓеÄÊý¾Ý¶¼Ó¦¸ÃÒþ²ØÔÚËùÔÚµÄÀàµÄÄÚ²¿¡£
2.ÀàµÄʹÓÃÕß±ØÐëÒÀÀµÀàµÄ¹«¹²½Ó¿Ú£¬µ«À಻ÄÜÒÀÀµËûµÄʹÓÃÕß¡£
3.¾¡Á¿¼õÉÙÀàЭÒéÖеÄÏûÏ¢¡£
4.ʵÏÖËùÓÐÀ඼Àí½âµÄ×î»ù±¾µÄ½Ó¿Ú¡££¨¿½±´²Ù×÷£¬°üÀ¨É±´ºÍdz¿½±´£©£¬ÏàµÈÐÔÅжϣ¬ÕýÈ·Êä³öÄÚÈÝ£¬´ÓASC2ÃèÊö½âÎöµÈµÈ¡£
5.²»°ÑʵÏÖϸ½ÚÈç·ÀÖ¹¹«¹²´úÂëµÄ˽Óк¯Êý.·Åµ½ÀàµÄ¹²Óнӿ ......

phpµ÷ÓÃmysql´æ´¢¹ý³Ì·µ»Ø¶à¸ö½á¹û¼¯µÄ´¦Àí

 ·µ»ØÒ»¸ö½á¹ûÈ«ÊÀ½ç¶¼ÖªµÀÔõô´¦Àí£¬¹Ø¼üÊÇ·µ»Ø¶à¸ö½á¹û¼¯¾Í²»ºÃ°ìÁË£¬ÏÂÃæÓÐÒ»½â¾ö°ì·¨
´æ´¢¹ý³Ì´úÂë
DELIMITER $$;
DROP PROCEDURE IF EXISTS `test`.`sp_test`$$
CREATE PROCEDURE `test`.`sp_test` ()
BEGIN
    select * from `user`.`user` limit 0, 50;
    select coun ......

PHP Apache ·þÎñ ¿ªÆô ÎÊÌâ

 ½ñÌìÔÚ¼ÒÀïÖØа²×°ÁËÒ»ÏÂPHP µ±ÈÃÒ²ÓÐApacheÁË¡£µ«ÊÇÎÒÓöµ½ÁËÒ»¸öÎÊÌ⣬¾ÍÊÇApache·þÎñÎÞ·¨¿ªÆô£¬ºó¹ûÔõÑùÎÒÏëºÜ¶àÈ˶¼ÊÇÖªµÀµÄ£¬µ±Ê±Ò²Ã»ÓжàÏ룬ÒÔΪÊÇ×Ô¼º°²×°µÄʱºò³öÏÖÁËʧÎó¾ÍÖØа²×°Ò»±é£¬¿ÉÊÇ»¹ÊÇÒ»ÑùÎÞ·¨´ò¿ª£¬È»ºóÎÒ¾ÍÔÚÏëÊÇʲôÎÊÌ⣬¶Ë¿ÚºÅ80.ÎҲ鿴ÁËһϣ¬·¢ÏÖûÓдíÎó°¡£¬Ë¼¿¼Á˺ܾ㬶ÔÍøÂçÒÔ¼°·À» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ