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

ʵ¼Ê¿ª·¢ÖпÉÄÜÓõ½µÄPHPµÄ×Ö·û´®²Ù×÷º¯Êý(×ܽá)

ÔÚ±à³ÌµÄ¹ý³Ìµ±ÖÐ,×Ö·û´®µÄ²Ù×÷ÊǷdz£ÖØÒªµÄ²¢ÇÒ¾­³£»á±»Óõ½,×Ö·û´®³£ÓõIJÙ×÷¾ßÌåµÄ°üÀ¨×Ö·û´®µÄÆ´½Ó,Ìæ»»×Ö·û´®,²éÕÒ×Ö·û´®,±È½Ï×Ö·û´®,¸´ÖÆ×Ö·û´®ÒÔ¼°¼ÆËã×Ö·û´®µÄ³¤¶ÈµÈµÈ.
1,Æ´½Ó×Ö·û´®
Æ´½Ó×Ö·û´®ÊÇ×î³£Óõ½µÄ×Ö·û´®²Ù×÷Ö®Ò»,ÔÚPHPÖÐÖ§³ÖÈýÖÖ·½Ê½¶Ô×Ö·û´®½øÐÐÆ´½Ó²Ù×÷,·Ö±ðÊÇÔ²µã.·Ö¸ô·û{}²Ù×÷,»¹ÓÐÔ²µãµÈºÅ.=À´½øÐвÙ×÷,Ô²µãµÈºÅ¿ÉÒÔ°ÑÒ»¸ö±È½Ï³¤µÄ×Ö·û´®·Ö½âΪ¼¸ÐнøÐж¨Òå,ÕâÑù×öÊDZȽÏÓкô¦µÄ.
2,Ìæ»»×Ö·û´®
ÔÚPHPÕâÃÅÓïÑÔÖÐ,ÌṩÁËÒ»¸öÃû×Ö½Ð×ösubstr_replace()µÄº¯Êý,¸Ãº¯ÊýµÄ×÷ÓÿÉÒÔ¿ìËÙµÄÍê³ÉɨÃèºÍ±à¼­Îı¾ÄÚÈݽ϶àµÄ×Ö·û´®Ìæ»»¹¦ÄÜ.ËûµÄÓï·¨¸ñʽ:
 mixed substr_replace(mixed $string,string $replacement, int $start[,int $length])
 ¶ÔÓÚÉÏÃæµÄÓï·¨¸ñʽµÄ˵Ã÷:
 string ÊÇÒª¼ì²é»òÕß½«Òª±»Ìæ»»µÄ×Ö·û´®
 replacement Ö¸¶¨ÒªÓÃÀ´²åÈë»òÕßÌæ»»µÄ×Ö·û´®
 start Ö¸¶¨ÔÚ×Ö·û´®µÄºÎ´¦½øÐпªÊ¼Ìæ»»,Õâ¸ö²ÎÊý¿ÉÒÔÈ¡ÈýÖÖÀàÐ͵ÄÖµ(ÕýÊý:´Ó×Ö·û´®¿ªÍ·µÄµÚstart¸öÆ«ÒÆÁ¿¿ªÊ¼Ìæ»»,¸ºÊý,´Ó×Ö·û´®½áβ´¦µÄµÚstart¸öÆ«ÒÆÁ¿¿ªÊ¼Ìæ»»,0:´Ó×Ö·û´®ÖеĵÚÒ»¸ö×Ö·û¿ªÊ¼Ìæ»»)
 lengthÖ¸¶¨ÒªÌæ»»¶àÉÙ¸ö×Ö·û,Õâ¸ö²ÎÊýÒ²¿ÉÒÔÈ¡ÈýÖÖÀàÐ͵ÄÖµ(ÕýÊý:±»Ìæ»»µÄ×Ö·û´®µÄ³¤¶È,¸ºÊý:´Ó×Ö·û´®µÄ½áβ¿ªÊ¼±»Ìæ»»µÄ×Ö·û´®µÄ³¤¶È,0:ÊDzåÈë²Ù×÷,¶ø²»ÊÇÌæ»»²Ù×÷);
3,¼ÆËã×Ö·û´®
1)¼ÆËã×Ö·û´®µÄ³¤¶È
 ÔÚPHPÖÐ,strlen()º¯ÊýÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È²¢ÇÒ·µ»Ø¸Ã×Ö·û´®µÄ³¤¶ÈÐÅÏ¢.¸ÃÓï·¨µÄ¸ñʽÈçÏÂ:int strlen(string $string)¸ñʽÀïÃæµÄstring¾ÍÊÇÓÃÀ´Ö¸¶¨Òª¼ÆË㳤¶ÈµÄ×Ö·û´®.
2)¼ÆËã×Ö·û´®µÄÊýÄ¿
 ÔÚPHPÖÐ,substr_count()º¯Êý,¿ÉÒÔÓÃÀ´·Ç³£·½±ã¶øÇÒ׼ȷµÄÈ·¶¨Ò»¸öÖ¸¶¨µÄ×Ó×Ö·û´®ÔÚËùÌṩµÄ×Ö·û´®ÖÐÓжàÉÙ¸ö,substr_count()º¯ÊýµÄÓï·¨¸ñʽÈçÏÂ:int substr_count(string $haystack,string $needle[,int $offset=0[,int $length]])ÔÚÉÏÃæµÄÓï·¨ÖÐÉè¼ÆµÄ²ÎÊýµÄ˵Ã÷ÈçÏÂ:haystackÖ¸¶¨Òª¼ì²éµÄ×Ö·û´®,needleÓÃÀ´Ö¸¶¨Òª²åÈëµÄ×Ö·û´®,offsetÓÃÀ´Ö¸¶¨ÔÚ×Ö·û´®Öкδ¦¿ªÊ¼ËÑË÷,ĬÈÏֵΪ0,lengthÓÃÀ´Ö¸¶¨ËÑË÷µÄ³¤¶È.
 ÔÚPHPÖÐ,str_word_count()º¯Êý,¿ÉÒÔÓÃÀ´·Ç³£·½±ã¶øÇÒ׼ȷµÄÈ·¶¨Ò»¸öijһ¸öµ¥´ÊÔÚËùÌṩµÄ×Ö·û´®ÖÐÓжàÉÙ¸ö,str_word_count()º¯ÊýµÄÓï·¨¸ñʽÈçÏÂ:mixed str_word_count(string $string[,int $format=0[,string $charlist]])ÔÚÉÏÃæµÄÓï·¨ÖÐÉæ¼°µ½µÄ²ÎÊýµÄ˵Ã÷ÈçÏÂ:stringÓÃÀ´Ö¸¶¨Òª½øÐмì²éµÄ×Ö·û´®,formatÓÃÀ


Ïà¹ØÎĵµ£º

PHP ±äÁ¿ºÍ³£Á¿µÄ¶¨Òå

±¾ÕÂ˵˵±äÁ¿µÄ¶¨Òå¡£
Èç¹û¶ÔÓÚ±äÁ¿ºÍ³£Á¿µÄ¶¨Ò壬Äã»á×¢Ò⼸¸ö·½ÃæÄØ£¿Äã¿ÉÄÜ»áÏëµ½£º
ÈçºÎ¶¨Òå±äÁ¿£¬ËüºÍC# µÈÓïÑÔÓÐʲô²»Í¬ÄØ£¿
±äÁ¿Çø·Ö´óСдÂð£¿
PHPµÄ±äÁ¿»¹ÓÐÆäËûÖØÒªµÄÂð£¿
³£Á¿ºÍ±äÁ¿µÄ¶¨ÒåÒ»ÑùÂð£¿
 ·Ö±ð½²Êö°É¡£
1.ÈçºÎ¶¨Òå±äÁ¿£¬ËüºÍC# µÈÓïÑÔÓÐʲô²»Í¬ÄØ£¿
   PHP ÖеıäÁ¿ÓÃÒ»¸ ......

php ÀàµÄʹÓÃ

Óû§¶¨ÒåµÄÀ࣬ҲÊÇѧºÃ PHP Ëù±Ø±¸µÄÌõ¼þÖ®Ò»¡£
¶ø PHP µÄÀ࣬ºÍÆäËüµÄÃæÏò¶ÔÏóÓïÑԱȽÏÆðÀ´£¬»¹ËãÂùµ¥´¿µÄ¡£
PHP Ö»ÓÐÀà±ð (class)¡¢·½·¨ (method)¡¢ÊôÐÔ¡¢ÒÔ¼°µ¥Ò»¼Ì³Ð (extensions) µÈ¡£
¶Ô²»Ï°¹ßʹÓà C++¡¢Java¡¢Delphi µÈÃæÏò¶ÔÏóÓïÑÔÀ´¿ª·¢³ÌÐòµÄÓû§£¬²»·ÁÏÈÔĶÁÒ»ÏÂÓйØÃæÏò¶ÔÏó¸ÅÄîµÄÊ飬ÏàÐÅ¿ÉÒÔ´øÀ´Ðí¶àµÄÊÕ ......

×Ô¼ºÐ´µÄÒ»¸öPHP·ÖÒ³Àà

Ïȸø´ó¼ÒÌùÒ»¸öʵÀý
test.php
<?php
//°üº¬seppageÀàÎļþ
require 'seppage.class.php';
//µ±Ç°Ò³Âë
$pagenow=2;
//Ò³Ãæ×ÜÊý
$pageall=10;
/*
*ÐèÒª·ÖÒ³µÄURLµØÖ·£¬¿ÉÒÔURLÖпÉÒÔ×ÔÓÉʹÓÃ?ºÅ»òÕß&ºÅ£¬³ÌÐò»á×Ô¶¯Ê¶±ð
*´Ë²ÎÊýºÍ$modurl²ÎÊýÉèÖÃÒ»Ïî¼´¿É£¬ÈôÁ½ÏÓУ¬Ôò°´$modurlΪ׼
*/
$url='http://l ......

PHPһЩÓÐÒâ˼µÄСÇø±ð

µ¥ÒýºÅ'ºÍË«ÒýºÅ"µÄÇø±ð£º

Ê×ÏÈÊǵ¥ÒýºÅÒª±ÈË«ÒýºÅÖ´ÐÐЧÂÊÒª¸ß£¬ÒòΪ˫ÒýºÅ»á¶ÔÄÚÈݽøÐÐÔ¤´¦Àí¡£
ÀýÈ磺'$value' Êä³ö×Ö·û $value ; "$value"Êä³ö±äÁ¿$valueµÄÖµ¡£
charºÍvarcharµÄÇø±ð£º

charÊǶ¨³¤¶øvarcharÊDZ䳤£¬charµÄÖ÷ÒªÌصãÊÇ´æ´¢·½Ê½Ô¤·ÖÅ䣬varcharµ±ËüµÄÊý¾Ý³¤¶È·¢Éú±ä»¯Ê±»áÓ ......

phpÓëÊý¾Ý¿â

PHPer
Ϊʲô±»ÈÏΪÊDzݸù£¿
                        —— Ò»¸öÖµµÃPHPer˼¿¼µÄÎÊÌâ
¿ªÆª×¢ÊÍ£ºÒÔÏÂÎÄ×Ö²¢Ã»Óзdz£¶àµÄ¼¼Êõ´Ê»ã£¬ËùÒÔÖ»Òª¶Ô
PHP
¸ÐÐËȤµÄÈ˶¼¿ÉÒÔ¿´¿´¡£
PHPe ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ