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

40¸ö¼¼ÇÉÓÅ»¯ÄúµÄPHP´úÂë

  ·¢²¼Ê±¼ä:2009-11-17 11:15 ¡¡×÷Õß: PHPChina ¡¡ÐÅÏ¢À´Ô´: PHPchina¡¡ ·¢±íÆÀÂÛ
1.Èç¹ûÒ»¸ö·½·¨Äܱ»¾²Ì¬£¬ÄǾÍÉùÃ÷ËûΪ¾²Ì¬µÄ£¬ËٶȿÉÌá¸ß1/4;
2.echoµÄЧÂʸßÓÚprint,ÒòΪechoûÓзµ»ØÖµ£¬print·µ»ØÒ»¸öÕûÐÍ;
3.ÔÚÑ­»·Ö®Ç°ÉèÖÃÑ­»·µÄ×î´ó´ÎÊý£¬¶ø·ÇÔÚÔÚÑ­»·ÖÐ;
4.Ïú»Ù±äÁ¿È¥ÊÍ·ÅÄڴ棬ÌرðÊÇ´óµÄÊý×é;
5.±ÜÃâʹÓÃÏñ__get, __set, __autoloadµÈħÊõ·½·¨;
6.requiere_once()±È½ÏºÄ×ÊÔ´;
7.ÔÚincludesºÍrequiresÖÐʹÓþø¶Ô·¾¶£¬ÕâÑùÔÚ·ÖÎö·¾¶»¨µÄʱ¼ä¸üÉÙ;
8.Èç¹ûÄãÐèÒªµÃsexinsexµ½½Å±¾Ö´ÐÐʱµÄʱ¼ä£¬$_SERVER['REQUSET_TIME']ÓÅÓÚtime();
9.ÄÜʹÓÃ×Ö·û´¦Àíº¯ÊýµÄ£¬¾¡Á¿ÓÃËûÃÇ£¬ÒòΪЧÂʸßÓÚÕýÔò;//php100.com
10.str_replace×Ö·ûÌæ»»±ÈÕýÔòÌæ»»preg_replace¿ì£¬µ«strtr±Èstr_replaceÓÖ¿ì1/4;
11.Èç¹ûÒ»¸öº¯Êý¼ÈÄܽÓÊÜÊý×éÓÖÄܽÓÊܼòµ¥×Ö·û×öΪ²ÎÊý£¬ÀýÈç×Ö·ûÌæ»»£¬²¢ÇÒ²ÎÊýÁÐ±í²»ÊÇÌ«³¤£¬¿ÉÒÔ¿¼ÂǶàÓÃһЩ¼ò½àµÄÌæ»»Óï¾ä£¬Ò»´ÎÖ»Ìæ»»Ò»¸ö×Ö·û£¬¶ø²»ÊǽÓÊÜÊý×é×öΪ²éÕÒºÍÌæ»»²ÎÊý¡£´óÊ»¯Ð¡£¬1+1>2;
12.ÓÃ@ÑڸǴíÎó»á½µµÍ½Å±¾ÔËÐÐËÙ¶È;
13.$row['id']±È$row[id]Ëٶȿì7±¶£¬½¨ÒéÑø³ÉÊý×é¼ü¼ÓÒýºÅµÄÏ°¹ß;
14.´íÎóÐÅÏ¢ºÜÓÐÓÃ;
15.ÔÚÑ­»·Àï±ðÓú¯Êý£¬ÀýÈçFor($x=0; $x < count($array); $x), count()º¯ÊýÔÚÍâÃæÏȼÆËã;
16.ÔÚ·½·¨ÀィÁ¢¾Ö²¿±äÁ¿ËÙ¶È×î¿ì£¬97xxoo¼¸ºõºÍÔÚ·½·¨Àïµ÷Óþֲ¿±äÁ¿Ò»Ñù¿ì;
17.½¨Á¢Ò»¸öÈ«¾Ö±äÁ¿Òª±È¾Ö²¿±äÁ¿ÒªÂý2±¶;
18.½¨Á¢Ò»¸ö¶ÔÏóÊôÐÔ(ÀàÀïÃæµÄ±äÁ¿)ÀýÈç($this->prop++)±È¾Ö²¿±äÁ¿ÒªÂý3±¶;
19.½¨Á¢Ò»¸öδÉùÃ÷µÄ¾Ö²¿±äÁ¿Òª±ÈÒ»¸ö³õʼ»¯µÄ¾Ö²¿±äÁ¿Âý9-10±¶;
20.ÉùÃ÷Ò»¸öδ±»ÈκÎÒ»¸öº¯ÊýʹÓùýµÄÈ«¾Ö±äÁ¿Ò²»áʹÐÔÄܽµµÍ(ºÍÉùÃ÷ÏàͬÊýÁ¿µÄ¾Ö²¿±äÁ¿Ò»Ñù)£¬PHP¿ÉÄÜÈ¥¼ì²éÕâ¸öÈ«¾Ö±äÁ¿ÊÇ·ñ´æÔÚ;
21.·½·¨µÄÐÔÄܺÍÔÚÒ»¸öÀàÀïÃ涨ÒåµÄ·½·¨µÄÊýĿûÓйØϵ£¬ÒòΪÎÒÌí¼Ó10¸ö»ò¶à¸ö·½·¨µ½²âÊÔµÄÀàÀïÃæ(ÕâЩ·½·¨ÔÚ²âÊÔ·½·¨µÄÇ°ºó)ºóÐÔÄÜûʲô²îÒì;
22.ÔÚ×ÓÀàÀï·½·¨µÄÐÔÄÜÓÅÓÚÔÚ»ùÀàÖÐ;//PHP100ÖÐÎÄÍø
23.Ö»µ÷ÓÃÒ»¸ö²ÎÊý²¢ÇÒº¯ÊýÌåΪ¿ÕµÄº¯ÊýÔËÐл¨·ÑµÄʱ¼äµÈÓÚ7-8´Î$localvar++ÔËË㣬¶øÒ»¸öÀàËƵķ½·¨(ÀàÀïµÄº¯Êý)ÔËÐеÈÓÚ´óÔ¼15´Î$localvar++ÔËËã;
24.Surrounding your string by ‘ instead of ” will make things interpret a little faster since php looks for variables inside “…” but not inside ‘…’. Of course you can only do this wh


Ïà¹ØÎĵµ£º

PHPµÄÈÕÆÚʱ¼äº¯Êýdate()

 1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõд×Ö·û£¬¶øСдmÔò±íÊ¾Ô ......

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

1.PHP±à³ÌÄÜÁ¦
2.MysqlÄÜÁ¦
A.Á˽⣺֪µÀʹÓÃPHPÁ´½ÓÊý¾Ý¿â£»¶®µÃһЩ¼òµ¥µÄSQL;½¨Á¢Ò»Ð©¼òµ¥µÄË÷Òý£»¶®µÃÓù¤¾ß¼òµ¥²Ù×÷Ò»ÏÂÊý¾Ý¿â£¨Ôöɾ¸Ä²éÊý¾Ý±í½á¹¹£©¡£
B.ÊìϤ£º¶®µÃÔÚ¿ª·¢Ó¦ÓÃÉÏÉè¼ÆÊý¾Ý¿â£¬½¨Á¢Ò»Ð©ÓÐЧµÄË÷Òý£¬ÓÃexplain·ÖÎöSQLÐÔÄÜ£¬Ñ¹Á¦²âÊԵȵȡ£
C.ºÜÊìϤ£ºÉîÈëÁ˽âÊý¾Ý¿âË÷Òý£¬´æ´¢ÒýÇæÔ­ÀíÒÔ¼°ÔËÐлúÖÆ£ ......

PHPÔÓ¼Ç

 preg_replace -- Ö´ÐÐÕýÔò±í´ïʽµÄËÑË÷ºÍÌæ»»
array_push --  ½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
preg_match -- ½øÐÐÕýÔò±í´ïʽƥÅä
exif_imagetype($file) ---ͼÏñÀàÐÍ£»
echo "<SCRIPT LANGUAGE='JavaScript'>alert('µÃµ½');history.back();</SCRIPT>";
exit;
date_defaul ......

PHP

 PHPÕ¾µãµÄÔÚÏ߽̳ÌÒѾ­ºÜ°ôÁË¡£ÔÚÄÇÀﻹÓÐһЩÆäËû½Ì³ÌµÄÁ´½Ó¡£¶ø±¾Îĵĸò¿·Ö½«ÈÃÄã¶ÔPHPÊìϤһµã¡£ÎÒ²»¿ÉÄÜ×öµ½Ã»ÓÐÈκÎÒÅ©£¬ÎÒµÄÄ¿µÄÖ»ÔÚÓÚÄÜÈÃÄãѸËÙ¿ªÊ¼ÄãµÄPHP±à³Ì¡£
2.1 Ê×ÒªÌõ¼þ
ÄãÊ×ÏȱØÐëÒªÓÐÒ»¸öÕýÔÚ¹¤×÷×ŵÄÖ§³ÖPHPµÄweb·þÎñÆ÷¡£ÎÒ¼Ù¶¨ÔÚÄãµÄ·þÎñÆ÷ÉÏËùÓÐPHPÎļþµÄÀ©Õ¹ÃûΪ.php3¡£
2.2 PHPµÄ°²×°
Éú ......

PHP½«Í¼Æ¬´æÈëMYSQL

 ÍêÕûµÄʵÏÖÁËPHP½«Í¼Æ¬´æÈëMYSQL
Ç°Ì᣺
 1 Ê×ÏȱØÐëÓµÓÐPHPµÄÔËÐл·¾³£¬ÁíÍ⻹µÃÓÐMYSQLÊý¾Ý¿â
 2 Èç¹ûÎļþ²»ÄÜÉÏ´«³É¹¦Çë¼ì²épicsÊÇ·ñÊÇ¿ÉдµÄȨÏÞ
Ê×ÏÈÏÈ°Ñpic2db.rarÎļþ½âѹµ½PHP¿ÉÒÔÔËÐÐĿ¼Ï¡£
Æä´ÎÔÚMYSQLÖн¨Á¢Ò»¸öÊý¾Ý¿â:pic2db,È»ºóÔÚ¸ÃÊý¾Ý¿âϽ¨Á¢Ò»¸ö±í£¬±í½á¹¹Îª£º
CREATE TABLE `pi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ