PHPһЩÓÐÒâ˼µÄСÇø±ð
µ¥ÒýºÅ'ºÍË«ÒýºÅ"µÄÇø±ð£º
Ê×ÏÈÊǵ¥ÒýºÅÒª±ÈË«ÒýºÅÖ´ÐÐЧÂÊÒª¸ß£¬ÒòΪ˫ÒýºÅ»á¶ÔÄÚÈݽøÐÐÔ¤´¦Àí¡£
ÀýÈ磺'$value' Êä³ö×Ö·û $value ; "$value"Êä³ö±äÁ¿$valueµÄÖµ¡£
charºÍvarcharµÄÇø±ð£º
charÊǶ¨³¤¶øvarcharÊDZ䳤£¬charµÄÖ÷ÒªÌصãÊÇ´æ´¢·½Ê½Ô¤·ÖÅ䣬varcharµ±ËüµÄÊý¾Ý³¤¶È·¢Éú±ä»¯Ê±»áÓ°ÏìÆä´æ´¢µÄÒ³·ÖÅä¡£
charÓëvarchar2ÊÇÒ»¶Ôì¶ÜµÄͳһÌ壬Á½ÕßÊÇ»¥²¹µÄ¹Øϵ.
varchar2±Èchar½ÚÊ¡¿Õ¼ä£¬ÔÚЧÂÊÉÏ±È char»áÉÔ΢²îһЩ£¬¼´ÒªÏë»ñµÃЧÂÊ£¬¾Í±ØÐëÎþÉüÒ»¶¨µÄ¿Õ¼ä£¬ÕâÒ²¾ÍÊÇÎÒÃÇÔÚÊý¾Ý¿âÉè¼ÆÉϳ£ËµµÄ‘ÒԿռ任ЧÂÊ'¡£
varchar2
ËäÈ»±È char½ÚÊ¡¿Õ¼ä£¬µ«ÊÇÈç¹ûÒ»¸övarchar2Áо³£±»Ð޸ģ¬¶øÇÒÿ´Î±»Ð޸ĵÄÊý¾ÝµÄ³¤¶È²»Í¬£¬Õâ»áÒýÆð‘ÐÐǨÒÆ'(Row
Migration)ÏÖÏ󣬶øÕâÔì³É¶àÓàµÄI/O£¬ÊÇÊý¾Ý¿âÉè¼ÆºÍµ÷ÕûÖÐÒª¾¡Á¦±ÜÃâµÄ£¬ÔÚÕâÖÖÇé¿öÏÂÓà char´úÌævarchar2»á¸üºÃһЩ¡£
mysql_connectºÍmysql_pconnectµÄÇø±ð
ÒýÓÃexceed php clubÂÛ̳ÉϵÄÅóÓÑÔ»°£º
phpÖÐmysql_pconnect()µÄʵÏÖ·½Ê½:
Æäʵmysql_pconnect()±¾Éí²¢Ã»ÓÐ×öÌ«¶àµÄ´¦Àí, ËüΨһ×öµÄÖ»ÊÇÔÚphpÔËÐнáÊøºó²»Ö÷¶¯closeµômysqlµÄÁ¬½Ó.
mysql_pconnect()Óë´Ëͬʱmysql_connect()µÄÇø±ð:
cgi·½Ê½ÏÂ:
ÔÚphp¾cgi·½Ê½ÔËÐÐʱpconnectºÍconnectÊÇ»ù±¾Ã»ÓÐÇø±ðµÄ, ÒòΪcgi·½Ê½ÊÇÿһ¸öphp·ÃÎÊÆðÒ»¸ö½ø³Ì, ·ÃÎʽáÊøºó½ø³ÌÒ²¾Í½áÊøÁË, ×ÊԴҲȫÊÍ·ÅÁË.
apacheÄ£¿é·½Ê½ÏÂ:
Çø±ðÔÚÓÚµ±phpÒÔapacheÄ£¿é·½Ê½ÔËÐÐʱ, ÓÉÓÚapacheÓÐʹÓýø³Ì³Ø, Ò»¸öhttpd½ø³Ì½áÊøºó»á±»·Å»Ø½ø³Ì³Ø, ÕâÒ²¾ÍʹµÃÓÃpconnect´ò¿ªµÄµÄÄǸömysqlÁ¬½Ó×ÊÔ´²»±»ÊÍ·Å, ÓÚÊÇÓÐÏÂÒ»¸öÁ¬½ÓÇëÇóʱ¾Í¿ÉÒÔ±»¸´ÓÃ.
Õâ¾ÍʹµÃÔÚapache²¢·¢·ÃÎÊÁ¿²»´óµÄʱºò, ÓÉÓÚʹÓÃÁËpconnect, php½ÚÊ¡ÁË·´¸´Á¬½ÓdbµÄʱ¼ä, ʹµÃ·ÃÎÊËٶȼӿì. ÕâÓ¦¸ÃÊDZȽϺÃÀí½âµÄ.
µ«ÊÇÔÚapache²¢·¢·ÃÎÊÁ¿´óµÄʱºò, Èç¹ûʹÓÃpconnect, »áÓÉÓÚ֮ǰµÄһЩhttpd½ø³ÌÕ¼ÓõÄmysqlÁ¬½ÓûÓÐclose, Ôò¿ÉÄÜ»áÒòΪmysqlÒѾ´ïµ½×î´óÁ¬½Ó×Å, ʹµÃÖ®ºóµÄһЩÇëÇóÓÀÔ¶µÃ²»µ½Âú×ã.
ÀýÈç:
Èômysql×î´óÁ¬½ÓÊýÉèΪ500, ¶øapacheµÄ×î´óͬʱ·ÃÎÊÊýÉèΪ2000
¼ÙÉèËùÓзÃÎʶ¼»áÒªÇó·ÃÎÊdb, ¶øÇÒ²Ù×÷ʱ¼ä»á±È½Ï³¤
µ±Ç°500¸öÇëÇóµÄhttpd¶¼Ã»ÓнáÊøµÄʱºò...Ö®ºóµÄhttd½ø³Ì¶¼ÊÇÎÞ·¨Á¬½Óµ½mysqlµÄ(ÒòÒѾ´ïµ½mysql×î´óÁ¬½ÓÊý). Ö»Óе±Ç°500¸öhttpd½ø³Ì½áÊø»ò±»¸´ÓòſÉÒÔÁ¬½ÓµÃµ½ÁËmysql.
ÆäÊ
Ïà¹ØÎĵµ£º
³£Á¿¿ÉÒÔÀí½âΪֵ²»±äµÄ±äÁ¿¡£³£Á¿Öµ±»¶¨Òåºó£¬Ôڽű¾µÄÆäËûÈκεط½¶¼²»Äܱ»¸Ä±ä¡£Ò»¸ö³£Á¿ÓÉÓ¢ÎÄ×Öĸ¡¢Ï»®Ïß¡¢ºÍÊý×Ö×é³É£¬µ« Êý×Ö²»ÄÜ×÷ΪÊ××Öĸ³öÏÖ¡£
ÔÚphpÖÐʹÓÃdefaine()º¯ÊýÀ´¶¨Òå³£Á¿£¬¸Ãº¯ÊýµÄÓï·¨¸ñʽΪ£º
define(string constant_name, mixed value, case_sensitive = true)
¸Ãº¯ÊýÓÐ3¸ö²ÎÊý£º
cons ......
eader()º¯ÊýʹÓÃ˵Ã÷£º
Ò»¡¢×÷Óãº
~~~~~~~~~
PHPÖ»ÊÇÒÔHTTPÐÒ齫HTMLÎĵµµÄ±êÍ·Ë͵½ä¯ÀÀÆ÷£¬¸æËßä¯ÀÀÆ÷¾ßÌåÔõô´¦ÀíÕâ¸öÒ³Ã棬ÖÁÓÚ´«Ë͵ÄÄÚÈÝÔòÐèÒªÊìϤһÏÂHTTPÐÒéÁË£¬ÓëPHPÎÞ¹ØÁË£¬¿É²ÎÕÕhttp://www.w3.org/Protocols/rfc2616/rfc2616¡£
& ......
ÓÉÓÚÄêÇ°°Ñ¹¤×÷È·ÈÏÏÂÀ´ÁË£¬ÓÚÊÇ×¼±¸ÀûÓÃ׫д±ÏÒµÂÛÎĵÄÆÚ¼äѧϰһÏÂPHPµÄ¿ª·¢£¬ÈκÎÒ»ÃÅÓïÑÔµÄѧϰ¹ý³Ì£¬µÚÒ»²½¶¼ÊÇ¿ª·¢»·¾³µÄ³É¹¦ÅäÖã¬ÓÚÊÇÎÒ»¨ÁËÒ»ÉÏÎçʱ¼ä°Ñ»·¾³´î½¨³É¹¦¡£
PHP¿ª·¢»·¾³ÅäÖùý³ÌÏê½â
±¾´ÎÅäÖÃÖ÷ÒªÕë¶ÔÓÚWindows XPϵÄÅäÖð²×°£¬ÖÁÓÚLinuxϵÄÅäÖð²×°½«ÔÚÒÔºó¸øÓè²¹³ä¡£
Ò»¡¢ËùÐèÈí¼þ
Windows XP ......
<mce:script type="text/javascript" language="javascript"><!--
function del(com_id,meet_id){
$.ajax({
url:'../company/meet.Ajax.php',
type:'POST',
data:{com_id:com_id,meet_id:meet_id},
dataType:"json",
timeout: 10 ......
PHP¸ÅÊö£º
phpÊÇHypertext Preprocessor(³¬Îı¾Ô¤´¦ÀíÆ÷)µÄËõд£¬ÊÇÒ»ÖÖ·þÎñÆ÷¶Ë¡¢¿çƽ̨¡¢HTMLǶÈëʽµÄ½Å±¾ÓïÑÔ£¬Æä¶ÀÌصÄÓï·¨»ìºÏÁËCÓïÑÔ¡¢JavaÓïÑÔºÍPerlÓïÑÔµÄÌص㣬ÊÇÒ»ÖÖ±»¹ã·ºÓ¦ÓõĿªÔ´Ê½µÄ¶àÓÃ;½Å±¾ÓïÑÔ£¬
ÓÈÆäÊʺÏweb¿ª·¢¡£phpÊÇb/sÌåϵ½á¹¹£¬ÊôÓÚÈý²ã½á¹¹¡£·þÎñÆô¶¯ºó£¬Óû§²»ÓÃÏàÓ¦¿Í»§¶ËÈí¼þ£¬Ö»ÓÃä¯ÀÀÆ÷ä¯ ......