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

php×Ö·û´®º¯ÊýÓ¦Ó×—¾­µä

  PHP: echo substr("1234567", 1, 3);
ºÍ PHP: echo substr(123456,1, 3);
ÊÇÒ»ÑùµÄ
¶¨Òå
Ò»°ãÓÃË«ÒýºÅ»òµ¥ÒýºÅ±êʶһ¸ö×Ö·û´®¡£±ÈÈç PHP: $str = "i love u";
$str = 'i love u';
ËüÕßÁ½ÕßÊÇÓÐһЩÇø±ðµÄ¡£ºóÕß½«Ò»Çе¥ÒýºÅµÄÄÚÈݶ¼»áµ±×÷×Ö·û´¦Àí£»Ç°ÕßÔò²»È»¡£±ÈÈç PHP: $test = "iwind";
$str = "i love $test";
$str1 = 'i love $test';
echo $str; //½«µÃµ½ i love iwind
echo $str1; //½«µÃµ½ i love $test
ͬÑùµÄÒÔÏÂÁ½¸öÀý×ÓµÄÐÐΪҲ²»Ò»ÑùµÄ: PHP: echo "i love \test"; // ½«µÃµ½ i love est,ÒѾ­½«\tÊÓΪתÒå
echo 'i love \test'; // ½«µÃµ½ i love \test
´Ó¶ø¿ÉÒÔ¼òµ¥ÈÏΪ˫ÒýºÅÀïµÄÄÚÈÝÊǾ­¹ý¡°½âÊÍ¡±¹ýµÄ£¬µ¥ÒýºÅµÄÊÇ¡°Ëù¼û¼´ËùµÃ¡±µÄ¡£ÏÔ¶øÒ×¼û£¬Ë«ÒýºÅÐÎʽµÄ¸üΪÁé»îһЩ£¬µ±È»µ¥ÒýºÅ»áÊÊÓÃÓÚһЩÌØÊâµÄ³¡ºÏ£¬ÕâÀï¾Í²»×÷²ûÊöÁË¡£
Êä³ö
PHPÀïµÄÊä³ö×î³£ÓõÄÊÇecho,print.Á½Õ߶¼²»ÊÇÕæÕýµÄº¯Êý£¬¶øÊÇÓïÑÔ¹¹Ô죬ËùÒÔµ÷ÓÃʱ²»±ØÓÃË«À¨ºÅ£¨±ÈÈçecho("test");print("test")).ÔÚÊä³öµÄʱºòÁ½Õ߶¼¿ÉÒÔʵÏÖ¸³Öµ£º PHP: echo $str="test"; //Ò»·½ÃæÊä³ötest,Ò»·½Ãæ°Ñ"test"¸³¸ø×Ö·û´®±äÁ¿ $str
print $str="test";
Á½Õß³ýÁËÃû×Ö²»Ò»ÑùÍ⣬»¹ÊÇÓÐÆäËüÇø±ðµÄ¡£print¾ßÓзµ»ØÖµ£¬Ò»Ö±·µ»Ø1,¶øechoûÓУ¬ËùÒÔecho±ÈprintÒª¿ìһЩ: PHP: $return = print "test";
echo $return; // Êä³ö1
Ò²ÕýÒòΪÕâ¸öÔ­Òò£¬printÄÜÓ¦ÓÃÓÚ¸´ºÏÓï¾äÖУ¬¶øecho²»ÄÜ: PHP: isset($str) or print "str ±äÁ¿Î´¶¨Òå"; // ½«Êä³ö"str ±äÁ¿Î´¶¨Òå"
isset($str) or echo "str ±äÁ¿Î´¶¨Òå";// ½«Ìáʾ·ÖÎö´íÎó
echoÒ»´Î¿ÉÊä³ö¶à¸ö×Ö·û´®£¬¶øprintÔò²»¿ÉÒÔ£º PHP: echo "i ","love ","iwind"; // ½«Êä³ö "i love iwind"
print "i ","love ","iwind"; // ½«Ìáʾ´íÎó
echo,print»¹¿ÉÒÔÊä³ö±»³Æ×÷¡°Îĵµ¾ä·¨¡±µÄ×Ö·û´®£¬¾ä·¨Èç: PHP: echo


Ïà¹ØÎĵµ£º

XPÏÂIISÅäÖÃPHP ºÍMySQL

µÚÒ»²½£º ÏÂÔغͰ²×°PHP
php°æ±¾: php-5.2.10-Win32.zip
1.½âѹphpÎļþµ½ c:\php
2.½«phpÎļþ¼ÐÏ php.ini-dist ¸ÄÃûΪ php.ini ,È»ºóÕÒµ½extension_dir = "./" ¸ÄΪ extension_dir = "c:\php\ext" (´ó¸ÅÔÚ461ÐÐ)
3.È¥µô;extension=php_mysql.dll Ç°µÄ";"×¢ÊÍ·ûºÅ (´ó¸ÅÔÚ589ÐÐ)(Èç¹ûûÓеĻ°¿ÉÒÔ¼ÓÉÏÕâÃû»°.)
4.¸´ÖÆp ......

ÔÚÉú²ú»·¾³ÖÐʹÓÃphpÐÔÄܲâÊÔ¹¤¾ßxhprof

xhprofÊÇfacebook¿ªÔ´³öÀ´µÄÒ»¸öphpÐÔÄܲâÊÔ¹¤¾ß£¬Ò²¿ÉÒÔ³Æ֮Ϊprofile¹¤¾ß£¬Õâ¸ö´Ê²»ÖªµÀÔõô·­Òë²Å±È½Ï´ïÒâ¡£¸ú֮ǰһֱʹÓõÄxdebugÏà±È£¬ÓкܶàÀàËÆÖ®´¦¡£ÒÔÇ°¶ÔxdebugÓÐһЩ¼Ç¼»¹¿ÉÒÔ¹©²Î¿¼£¬µ«ÊÇËüµÄȱµãÊǶÔÐÔÄÜÓ°ÏìÌ«´ó£¬¼´±ãÊÇ¿ªÆôÁËprofiler_enable_trigger²ÎÊý£¬ÓÃÔÚÉú²ú»·¾³ÖÐÒ²ÊDzҲ»È̶ã¬cpuÁ¢¿Ì¾Íì­µ½high ......

ÃæÏò¶ÔÏ󿪷¢Ñ§Ï°£¨Î壩£¨PHPµÚ¶þʮһ½²£©

ÕâÒ»½Ú¿ÎµÄÄÚÈݱȽÏÉÙ£¬Ö÷Òª½²Á˳éÏóÀàºÍ³éÏó·½·¨¡£
³éÏóÀàÊÇÖ¸º¬ÓгéÏó·½·¨µÄÀ࣬³éÏóÀàÖÁÉÙÒª°üº¬Ò»¸ö³éÏó·½·¨¡£ÓÃabstract¹Ø¼ü×Ö¶¨Òå³éÏó·½·¨ºÍÀà¡£
³éÏó·½·¨µÄÌصãÊÇÖ»Óз½·¨Ãû£¬²»°üº¬·½·¨Ì壬¼´Ã»Óз½·¨ÊµÏÖ£¬¾ßÌåÌåÏÖÔÚ´úÂëÖоÍÊdzéÏó·½·¨²»°üº¬´óÀ¨ºÅ{}¡£
³éÏóÀ಻Äܱ»ÊµÀý»¯£¬Ö»Äܱ»¼Ì³Ð£¬¼Ì³ÐµÄ×ÓÀà±ØÐëÖØÔظ¸ ......

php³ÌÐòÌáËÙÔ­Àí·ÖÎö

Ô­Ìù:http://www.paitoubing.cn/blog/tag/apc
php³ÌÐòÌáËÙÔ­Àí·ÖÎö
2008Äê7ÔÂ19ÈÕ
ûÓÐÆÀÂÛ


¹Ø¼ü´Ê£ºxCache,Zend Accelerator,memcahced,xdebug£¬Zend Optimizer,APC.
»º³å²ã¼¶±ðµÄÓÅ»¯
xCacheÊÇ°Ñ PHP ²Ù×÷Â뻺´æµ½ÄÚ´æÖÐµÄ PHP À©Õ¹ÖУ¬XCache ½«±ÜÃâ´ú¼Û¸ß°ºÇÒ²»±ØÒªµÄ»¨·ÑÀ´ÖØбàÒëÏ ......

Óà PHP ¶ÁÈ¡ÎļþµÄÕýÈ··½·¨


 
Á˽âÈçºÎʹÓà PHP µÄ¸÷ÖÖÎļþº¯Êý¡£²é¿´ÖîÈç fopen¡¢fclose ºÍ feof Ö®ÀàµÄ»ù±¾Îļþº¯Êý£»Á˽âÖîÈç fgets¡¢fgetss ºÍ fscanf Ö®ÀàµÄ¶ÁÈ¡º¯Êý¡£²¢ÇÒ·¢ÏÖÓÃÒ»Á½ÐдúÂë´¦ÀíÕû¸öÎļþµÄº¯Êý¡£
ÈÃÎÒÃÇËãÒ»ËãÓжàÉÙÖÖ·½·¨
´¦ÀíÖîÈç PHP Ö®ÀàµÄÏÖ´ú±à³ÌÓïÑÔµÄÀÖȤ֮һ¾ÍÊÇÓдóÁ¿µÄÑ¡Ïî¿ÉÓá£PHP ¿ÉÒÔÇáËɵØÓ®µÃ Perl µÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ