ÖÓʤ»Ô̸PHP·¢Õ¹µÄÏÖ×´ºÍÇ°¾°
ÖÓʤ»Ô̸PHP·¢Õ¹µÄÏÖ×´ºÍÇ°¾°
diggsoft.com ʱ¼ä:2009-09-19 12:56À´Ô´:51CTO
ÖÓʤ»Ô£¨µµ·ç£© PHPCMS´´Ê¼ÈË ÔKu6 PhpcmsÊÂÒµ²¿¾Àí 51CTO¼ÇÕߣº´ÓWeb¿ª·¢µÄÀúÊ·¿´À´£¬PHP¡¢PythonºÍRuby¼¸ºõÊÇͬʱ³öÏֵģ¬¶¼ÊÇÊ®·ÖÓÐÌصãµÄ¡¢ÓÅÐãµÄ¿ªÔ´ÓïÑÔ£¬µ«PHPÈ´»ñµÃÁ˱ÈPythonºÍRuby¶àµÃ¶àµÄ
¡¡¡¡
ÖÓʤ»Ô£¨µµ·ç£© PHPCMS´´Ê¼ÈË ÔKu6 PhpcmsÊÂÒµ²¿¾Àí
51CTO¼ÇÕߣº´ÓWeb¿ª·¢µÄÀúÊ·¿´À´£¬PHP¡¢PythonºÍRuby¼¸ºõÊÇͬʱ³öÏֵģ¬¶¼ÊÇÊ®·ÖÓÐÌصãµÄ¡¢ÓÅÐãµÄ¿ªÔ´ÓïÑÔ£¬µ«PHPÈ´»ñµÃÁ˱ÈPythonºÍRuby¶àµÃ¶àµÄ¹Ø×¢¶È£¨PHPÔÚ±¾ÔµÄTIOBEÅÅÐаñÉÏÒѾÅÅÐеÚÈý£¬³¬¹ýC++ÁË£©¡£ÄúÈÏΪÕâºÍPHPÖ¼ÔÚÍøÕ¾¿ª·¢µÄÁ¢×ãµãÓëPHPÓïÑÔ±¾ÉíµÄÌصãÓкܴó¹Øϵô£¬»¹ÊÇÓÐʲôÆäËûµÄÒòËØÓ°Ï죿
ÖÓʤ»Ô£ºÈýÃÅÓïÑÔµ±ÖУ¬ÎÞÒÉphpÊÇ×îÁ÷Ðеģ¬¶øPythonºÍRubyÔÚ×î½ü¼¸ÄêÒ²ÓÐ×Ų»´íµÄ·¢Õ¹Ç÷ÊÆ¡£ÎÒ¸öÈËÈÏΪ£¬RubyµÄÁ÷Ðиü¶àµØÔ´ÓÚRuby on Rails£¬Õâ¸ö¿ò¼ÜµÄÁ÷Ðг̶ÈÉõÖÁ³¬¹ýÁËRubyÓïÑÔ±¾Éí£¬Ò²Òý·¢ÁËÆäËüÓïÑÔƽ̨É϶Կò¼ÜµÄÑо¿¡£¶øPythonÔÚ½üÀ´µÄ±»¹Ø×¢¶ÈºÍ·¢Õ¹ËÙ¶ÈÒª³¬¹ýRuby£¬±»Ò»Ð©Ï²»¶´´ÐµÄÏîÄ¿²ÉÓã¬Õâ¿ÉÄÜÒª¸ü¶àµØ¹é¹¦ÓÚgoogle¡£
ÕâÈýÖÖÓïÑÔ¶¼ÊÇÏ൱ÓÅÐãµÄ½Å±¾ÓïÑÔ£¬ÎªÊ²Ã´PHPÄÜ´óÐÐÆäµÀ£¬É±ÈëÅÅÐаñµÄÈý¼×ÄØ£¿´Ó±íÃæÉÏÀ´¿´£¬ÕâÊǾÍÒµ»·¾³Ê¹È»¡£Ô½À´Ô½¶àµÄй«Ë¾»òÕßÐÂÏîĿʹÓÃPHP£¬ÕâʹµÃPHPÏà¹ØÉçÇøÔ½À´Ô½»îÔ¾£¬¶øÕâÓÖ·´¹ýÀ´Ó°Ïìµ½ºÜ¶àÏîÄ¿»ò¹«Ë¾µÄÑ¡Ôñ£¬ÐγÉÒ»¸öÁ¼ÐÔµÄÑ»·¡£¾ÍÎÒÄ¿Ç°Á˽⵽µÄÇé¿ö£¬PHPÊǹúÄڴ󲿷ÖwebÏîÄ¿µÄÊ×Ñ¡£¬¶øÇÒÓкܶ๫˾´ÓÆäËüÓïÑÔ£¨ÈçASP£¬JAVA£©×ªµ½ÁËPHP¡£ºÏÊʵľÍÊÇ×îºÃµÄ£¬PHPµÄ¿ìËÙ£¬¿ª·¢³É±¾µÍ£¬ÖÜÆڶ̣¬ºóÆÚά»¤·ÑÓõͣ¬¿ªÔ´²úÆ··á¸»£¨Õâµã¿ÉÒÔÓ°Ïìµ½ºÜ¶àÏîÄ¿µÄ¾ö²ß£©£¬ÕâЩ¶¼ÊÇÁíÍâÁ½ÖÖÓïÑÔÎÞ·¨±ÈÄâµÄ¡£ÁíÍ⣬Ôںܶà´óÏîÄ¿ÖУ¬Python¸ü¶àµØÊÇ×öΪһÖÖ“Õ³ºÏ¼ÁÓïÑÔ”³öÏÖ£¬ËƺõÕýÔÚ×ßÏòÓëPHP²»Í¬µÄ·¢Õ¹·½Ïò£¬ÈÃÎÒÃÇÊÃÄ¿ÒÔ´ý¡£
51CTO¼ÇÕߣºPHP¿ª·¢¿ò¼ÜµÄÊ¢ÐÐÊÇÓÉRoRµÄ»ð±¬ËùÒýÆðµÄ£¬¶øPHP¿ò¼ÜµÄ·¢Õ¹Ò²´ÓÄ£·ÂRailsµ½Öð½¥ÓÐÁË×Ô¼ºµÄ·ç¸ñ¡£²»¹ýÈÔÈ»ÓкܶàÈëÐнÏÔçµÄPHP¿ª·¢ÕßÖÁ½ñÈÔÈÏΪPHPÕâÖÖ¿ì½ÝµÄÓïÑÔ²»ÐèÒª¿ò¼Ü£¬ÉõÖÁÈÏΪֻҪÓÐÓÅÐãµÄ¼Ü¹¹£¬¿ò¼Ü¸ù±¾Ã»±ØÒª¡£ÄúÈÏΪPHP¿ò¼Ü¶ÔPHP¶øÑÔÊDZØÒªµÄô£¿Äú¶ÔÓÚPHP¿ª·¢¹¤¾ßµÄÏÖ×´ÂúÒâô£¿
ÖÓʤ»Ô£ºÕâÊÇÒ»¸ö¼ûÈʼûÖǵÄÎÊÌ⣬ÎÒ¸öÈËÈÏΪ£¬Ò»¸öÓÅÐãµÄ¿ò¼ÜÄÜÔںܴó³Ì¶ÈÉÏÌá¸ß¹¤×÷ЧÂÊ£¬ÓÈÆäÊǶԴóÖÐÐÍÏîÄ¿¡£µ±È»Èç¹û¶ÔÏîÄ¿ÓÐ×ã¹»µÄ°Ñ¿ØÄÜÁ¦£¬¿ò¼ÜÒ²²¢·ÇÊDZØÐëµÄ£¬±Ï¾¹PHPµÄ¿
Ïà¹ØÎĵµ£º
³õѧPHPµÄʱºò£¬ÎÒÃǾ³£±»PHPµÄ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶ÅªµÄÔÎͷתÏò¡£Â·¾¶ÎÊÌâ¾³£µ¼ÖÂinclude¼°requireÃüÁî²»ÄܼÓÔص½Ö¸¶¨µÄÒ³
Ã棬´Ó¶øµ¼ÖÂWeb³ÌÐòÔËÐдíÎó¡£±¾ÎĽ«¸ú´ó¼ÒÒ»Æð̽ÌÖÒ»ÏÂPHP·¾¶ÎÊÌâµÄ³£Óýâ¾ö·½°¸¡£
ÏÂÃæÎÒÃÇÏÈ×öÒ»¸ö¸ö¼òµ¥µÄʾÀý:
ÉÏͼÊÇÒ»¸ö¼òµ¥WebÏîÄ¿µÄ½á¹¹Í¼,ÆäÖи÷ÎļþµÄ´úÂëÈçÏÂ: ......
ÕýÔò±í´ïʽ×Ô¼ºÒ»Ö±²»ÊìϤ£¬Õâ2ÌìÔÚÍøÉÏÒ»Ö±¿´¹ØÓÚËüµÄÎÄÕ£¬×Ô¼º×ܽáÁ˼¸¸öº¯Êý¡£
1£®preg_match()
º¯ÊýÔÐÍ£ºint preg_match (string $pattern, string $content [, array
$matches])
preg_match
()º¯ÊýÔÚ$content×Ö·û´®ÖÐËÑË÷Óë$pattern¸ø³öµÄÕýÔò±í´ïʽÏàÆ¥ÅäµÄÄÚÈÝ¡£Èç¹ûÌṩÁË$matches£¬Ôò½«Æ¥Åä½á¹û·ÅÈëÆäÖС ......
1¡¢eregÀïÃæÊDz»ÐèÒªÒ²²»ÄÜʹÓ÷ָô·ûºÍÐÞÊηûµÄ£¬ËùÒÔeregµÄ¹¦ÄܱÈpregÒªÈõÉϲ»ÉÙ¡£
¡¡¡¡2¡¢¹ØÓÚ"."£ºµãÔÚÕýÔòÀïÃæÒ»°ãÊdzýÁË»»ÐзûÒÔÍâµÄÈ«²¿×Ö·û£¬µ«ÊÇÔÚeregÀïÃæµÄ"."ÊÇÈÎÒâ×Ö·û£¬¼´°üÀ¨»»Ðзû£¡Èç¹ûÔÚpregÀïÃæÏ£Íû"."
Äܹ»°üÀ¨»»Ðзû£¬¿ÉÒÔÔÚÐÞÊηûÖÐ ......
phpÑéÖ¤ÂëÏÔʾºìÉ«²æ²æ
Õâ¸öÎÊÌâÀ§ÈÅÎÒ°ëÌìÁË¡£ÔÚ±¾»úÉϲâÊÔÊÇÕý³£µÄ£¬»·¾³ÊÇwin2003+php+mssql.ÏÔʾÕý³£¡£
ÏÖÔÚÎҰѳÌÐòתÒƵ½Ð·þÎñÆ÷ÉÏ£¬ÑéÖ¤Âë¾Í²»ÏÔʾÁË£¬²»ÖªµÀÊÇʲôÇé¿ö£¬ÎÒ¼ì²âÁË·þÎñÆ÷»·¾³£¬gdÊÇÖ§³ÖµÄ£¬ÈçÏÂͼ:
µ«ÊÇ£¬¾ÍÊDz»ÏÔʾ£¬ÈçÓиßÊÖ£¬Çë¸úÌû£¬Ð»Ð»ÁË¡£ ......
ÏîÄ¿½á¹¹ÈçÉÏ
´´½¨counter.txtÎļþ
´´½¨counter1.phpÎļþ
³õʼ»¯counter.txtÎļþÖеÄÄÚÈÝ
ÊäÈë“0”
counter1.phpÎļþ´úÂë
<?php
$fp = fopen("counter.txt","r");
if ($str1==false){
$str1 = 0;
}
$str1 = fgets($fp,10);
$str1++;
fclose($fp);
$fp = ......