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

PHPÖÐpregº¯ÊýģʽÐÞÕý·û

i ×î³£¼ûµÄ,´óСдºöÂÔģʽ. m (PCRE_MULTILINE) ¶àÐÐģʽ.ĬÈÏÇé¿öÏÂ,PCRE½«Ä¿±ê×Ö·û´®×÷Ϊµ¥Ò»µÄÒ»"ÐÐ"×Ö·ûËù×é³ÉµÄ£¨ÉõÖÁÆäÖаüº¬Óл»ÐзûÒ²ÊÇÈç´Ë)."ÐÐÆðʼ"Ôª×Ö·û£¨^£©½ö½öÆ¥Åä×Ö·û´®µÄÆðʼ,"ÐнáÊø"Ôª×Ö·û£¨$£©½ö½öÆ¥Åä×Ö·û´®µÄ½áÊø£¬»òÕß×îºóÒ»¸ö×Ö·ûÊÇ»»ÐзûʱÆäÇ°Ãæ£¨³ý·ÇÉ趨ÁË D ÐÞÕý·û£©.ÕâºÍ Perl ÊÇÒ»ÑùµÄ.µ±É趨ÁË´ËÐÞÕý·û"ÐÐÆðʼ"ºÍ"ÐнáÊø"³ýÁËÆ¥ÅäÕû¸ö×Ö·û´®¿ªÍ·ºÍ½áÊøÍâ,»¹·Ö±ðÆ¥ÅäÆäÖеĻ»ÐзûµÄÖ®ºóºÍ֮ǰ.ÕâºÍ Perl µÄ /m ÐÞÕý·ûÊǵÈЧµÄ.Èç¹ûÄ¿±ê×Ö·û´®ÖÐûÓÐ"\n"×Ö·û»òÕßģʽÖÐûÓÐ^»ò$,ÔòÉ趨´ËÐÞÕý·ûûÓÐÈκÎЧ¹û. s (PCRE_DOTALL) Èç¹ûÉ趨ÁË´ËÐÞÕý·û,ģʽÖеÄÔ²µãÔª×Ö·û(.)Æ¥ÅäËùÓеÄ×Ö·û,°üÀ¨»»Ðзû.ûÓдËÉ趨µÄ»°,Ôò²»°üÀ¨»»Ðзû.ÕâºÍ Perl µÄ /s ÐÞÕý·ûÊǵÈЧµÄ.Åųý×Ö·ûÀàÀýÈç [^a] ×ÜÊÇÆ¥Åä»»ÐзûµÄ,ÎÞÂÛÊÇ·ñÉ趨ÁË´ËÐÞÕý·û. x (PCRE_EXTENDED) Èç¹ûÉ趨ÁË´ËÐÞÕý·û,ģʽÖеĿհ××Ö·û³ýÁ˱»×ªÒåµÄ»òÔÚ×Ö·ûÀàÖеÄÒÔÍâÍêÈ«±»ºöÂÔ£¬ÔÚδתÒåµÄ×Ö·ûÀàÖ®ÍâµÄ#ÒÔ¼°ÏÂÒ»¸ö»»ÐзûÖ®¼äµÄËùÓÐ×Ö·û,°üÀ¨Á½Í·,Ò²¶¼±»ºöÂÔ.ÕâºÍPerl µÄ/x ÐÞÕý·ûÊǵÈЧµÄ,ʹµÃ¿ÉÒÔÔÚ¸´ÔÓµÄģʽÖмÓÈë×¢ÊÍ¡£È»¶ø×¢Ò⣬Õâ½öÊÊÓÃÓÚÊý¾Ý×Ö·û¡£¿Õ°××Ö·û¿ÉÄÜÓÀÔ¶²»»á³öÏÖÓÚģʽÖеÄÌØÊâ×Ö·ûÐòÁÐ,ÀýÈçÒýÈëÌõ¼þ×ÓģʽµÄÐòÁÐ (?( Öмä. e Èç¹ûÉ趨ÁË´ËÐÞÕý·û,preg_replace() ÔÚÌæ»»×Ö·û´®ÖжÔÄæÏòÒýÓÃ×÷Õý³£µÄÌæ»»,½«Æä×÷Ϊ PHP ´úÂëÇóÖµ,²¢ÓÃÆä½á¹ûÀ´Ìæ»»ËùËÑË÷µÄ×Ö·û´®, Ö»ÓÐ preg_replace() ʹÓôËÐÞÕý·û£¬ÆäËü PCRE º¯Êý½«ºöÂÔÖ®. ×¢: ±¾ÐÞÕý·ûÔÚ PHP3 Öв»¿ÉÓÃ. A (PCRE_ANCHORED) Èç¹ûÉ趨ÁË´ËÐÞÕý·û£¬Ä£Ê½±»Ç¿ÖÆÎª"anchored",¼´Ç¿Öƽö´ÓÄ¿±ê×Ö·û´®µÄ¿ªÍ·¿ªÊ¼Æ¥Åä¼´×Ô¶¯ÔÚģʽ¿ªÍ·¼ÓÉÏ^.´ËЧ¹ûÒ²¿ÉÒÔͨ¹ýÊʵ±µÄģʽ±¾ÉíÀ´ÊµÏÖ(ÔÚPerl ÖÐʵÏÖµÄΨһ·½·¨). D (PCRE_DOLLAR_ENDONLY) Èç¹ûÉ趨ÁË´ËÐÞÕý·û,ģʽÖеÄÃÀÔªÔª×Ö·û½öÆ¥ÅäÄ¿±ê×Ö·û´®µÄ½áβ.ûÓдËÑ¡Ïîʱ,Èç¹û×îºóÒ»¸ö×Ö·ûÊÇ»»ÐзûµÄ»°,ÃÀÔª·ûºÅÒ²»áÆ¥Åä´Ë×Ö·û֮ǰ(µ«²»»áÆ¥ÅäÈÎºÎÆäËü»»Ðзû֮ǰ).Èç¹ûÉ趨ÁËmÐÞÕý·ûÔòºöÂÔ´ËÑ¡Ïî.Perl ÖÐûÓÐÓëÆäµÈ¼ÛµÄÐÞÕý·û. S µ±Ò»¸öģʽ½«±»Ê¹ÓÃÈô¸É´Îʱ£¬Îª¼ÓËÙÆ¥ÅäÆð¼ûÖµµÃÏÈ¶ÔÆä½øÐзÖÎö.Èç¹ûÉ趨ÁË´ËÐÞÕý·ûÔò»á½øÐжîÍâµÄ·ÖÎö.Ŀǰ£¬·ÖÎöÒ»¸öģʽ½ö¶ÔûÓе¥Ò»¹Ì¶¨Æðʼ×Ö·ûµÄ non-anchored ģʽÓÐÓᣠU (PCRE_UNGREEDY) ±¾ÐÞÕý·û·´×ªÁËÆ¥ÅäÊýÁ¿µÄֵʹÆä²»ÊÇĬÈϵÄÖØ¸´,¶ø±ä³ÉÔÚºóÃæ¸úÉÏ¡°?¡±²Å±äµÃÖØ¸´.ÕâºÍ Perl ²»¼æÈÝ.Ò²¿ÉÒÔͨ¹ýÔÚģʽ֮ÖÐÉ趨


Ïà¹ØÎĵµ£º

PHP²¢·¢·ÃÎÊÀý×Ó

<?php
$start=$_GET['s'];
$end=$_GET['e'];

$requests = array();
for ($index = $start; $index < $end; $index++) {
$url="http://www.essort.com/amfphp/services/curl/loadTest.php?uid=$index";
$requests[]=$url;
}
$main = curl_multi_init();
$results = array();
$errors = array(); ......

PHp´úÂë¹æ·¶


×¢£ºÕâÊÇ´ÓPHPCMS¿ª·¢ÎĵµÀï¿´µ½±àÂë¹æ·¶£¬ËäÃûΪPHPCMSµÄ¿ª·¢¹æ·¶£¬µ«ÎÒ¾õµÃËùÓеÄPHP±à³Ì¶¼¸ÃÈç´Ë¡£Ð´ÁËÄÇô¶àPHP£¬ºÜ¶à±àÂë¶ÔÕÕÕâ¹æ·¶¶¼¸Ð¾õǷȱºÜ¶à£¬½ñºóÒ»¶¨Òª¶ÔÕÕ¾ÀÕý¡£
Phpcms ±àÂë¹æ·¶
1. ÒýÑÔ…. 2
2. ÊÊÓ÷¶Î§…. 2
3. ±ê×¼»¯µÄÖØÒªÐԺͺô¦…. 3
4. PHP±àÂë¹æ·¶ÓëÔ­Ôò…. 3
4. ......

apache mysql php°²×°

1.apacheµÄ°²×°
apache±¾À´ÊÇÏëÓñàÒë°²×°µÄ£¬µ«ÊÇÆädevelÐèÒªÒÀÀµÒ»Ð©ÆäËûµÄ°ü£¬°²×°ÆðÀ´Ì«Âé·³£¬ËùÒÔ¾ö¶¨Ê¹Óñ¾µØyumÔ´°²×°£»ÔÚrhel5u3ÉÏ£¬Ö±½Ó yum install httpd
     yum install httpd-devel
ÕâÑù»áÓÐhttpd-develµÄһЩÒÀÀµ°üÒ»²¢°²×°ÁË£»
rpm°²×°µÄhttpdÓÐÈçϼ¸¸öÖØÒªµÄĿ¼£º
1)/etc/ht ......

php»·¾³´î½¨


µÚÒ»²½£ºÏÂÔØ°²×°³ÌÐò
£¨1£© Apache2.2.4°æÏÂÔØ£¬µØÖ·£ºhttp://httpd.apache.org/download£¬Ñ¡Ôñ
apache_2.2.4-win32-x86-no_ssl.msi£¬´óÔ¼4M¶à¡£
£¨2£©PHP5.2.3°æÏÂÔØ£¬ µØÖ·£ºhttp://www.php.net/downloads.php£¬Ñ¡ÔñWindows BinariesÏÂÃæµÄPHP5.2.3.zip package£¬Ëü¶ÔÓ¦php-5.2.3-Win32.zipÎļþ£¬´óÔ¼9M¶à¡£
µÚ¶þ² ......

phpдµÄ´óÕûÊýµÄ³Ë·¨

/*************Ê®½øÖÆ´óÕûÊýÏà³Ë****************/
    /*********
     * $A£¬$B¾ùΪ×Ö·û´®
     */
    function multipication ($A,$B){
        $sResult = "";
       ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ