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

PHP ¶à×Ö½Ú×Ö·û´®ºÍ×Ö·û¼¯

// ÎÒ¿´¹ýµÄÁ½±¾Êé PHP µÄÊéÖÐÌá¼°µ½ PHP6 µÄÐÂÌØÐÔ£¬ÆäÖÐÁ½¸öÊÇ namespace ºÍ unicode£¬
// ´Ó PHP5.3 ¿ªÊ¼£¬php ÒѾ­Ö§³Ö namespace ÁË; ¶ø Unicode ÔÚ PHP5.3 Öл¹Ã»Óз¢²¼¡£
//
// ¿´Êé¿´µ½ PHP µÄ¶à×Ö½Ú´¦Àí£¬Ï뵽ǰ¶Îʱ¼ä»¹»á×Ô¼º½ØÈ¡ ÖÐÓ¢»ìºÏµÄ×Ö·û´®£¬ÄÇʱºò»¨Á˺ܳ¤Ê±¼äÀ´¿´ utf£­8£¬
// gbk, gb2312, gb18030, unicode Ö®ÀàµÄ£¬ÏÖÔÚ¿´ÓÐÁ˶à×Ö½Ú´¦ÀíµÄÀ©Õ¹²»ÐèÒªÄÇôÂé·³ÁË¡£
//
// php5 ÔÚÁ½¸öÀ©Õ¹ÖÐÖ§³Ö×Ö·û±àÂëºÍ¶à×Ö½ÚÎÊÌ⣺
// iconv ºÍ mbstring
// Á½¸öÖ®¼äµÄÖ÷ÒªÇø±ð£º
// iconv ʹÓõÄÒ»¸öÍⲿµÄ¿â£»¶ø mbstring ʹÓõÄÊÇ php °ï¶¨µÄ¿â¡£
// ÒòΪ iconv (Ö»ÉÙÔÚ×îÐ嵀 linux °æ±¾ÖÐ)Ö§³Ö¸ü¶àµÄ±àÂ룬ËùÒÔ iconv ¿ÉÄÜÊÇͨÓû°×îºÃµÄÑ¡Ôñ¡£
/**
* iconv º¯Êý
*/
iconv_get_encoding()
// 0/1
// Retrieve internal configuration variables of iconv extension
iconv_mime_decode_headers()
// 1/3
// Decodes multiple MIME header fields at once
// ·µ»ØÊý×é
// Returns an associative array that holds a whole set of MIME header fields specified
// by encoded_headers on success, or FALSE if an error occurs during the decoding.
iconv_mime_decode()
// 1/3
// Decodes a MIME header field
// Returns a decoded MIME field on success, or FALSE if an error occurs during the decoding.
iconv_mime_encode()
// 2/3
// Composes a MIME header field
// Returns an encoded MIME field on success, or FALSE if an error occurs during the encoding.
iconv_set_encoding()
// 2/2
// Set current setting for character encoding conversion
// Returns TRUE on success or FALSE on failure.
// iconv_set_encoding() ¿ÉÒÔÓÃÀ´ÉèÖÃÄÚ²¿±àÂëºÍÊä³ö±àÂ룻
// ÄÚ²¿±àÂëÉèÖÿÉÒÔÓ°ÏìһϵÁд¦Àí×Ö·û´®µÄº¯Êý¡£Êä³ö±àÂëÑ¡ÏîË¿ºÁ²»»áÓ°ÏìÄÇЩ¹¦ÄÜ£¬
// µ«ÊÇ¿ÉÒÔÓÃÀ´ÓÚ ob_iconv_handler Êä³ö»º³å´¦ÀíÆ÷×éºÏʹÓÃ.
// Èç¹û¿ªÆô£¬php ½«×Ô¶¯°ÑÊä³öµ½ä¯ÀÀÆ÷µÄÎı¾´ÓÄÚ²¿±àÂëת»»ÎªÊä³ö±àÂë¡£
// --
ob_start( 'ob_iconv_handler');
iconv_set_encoding( 'internal_encoding', 'UTF-8');
iconv_set_encoding( 'output_encoding', 'ISO-8859-1');
print_r( iconv_get_encoding() );
$text = <<<TEXT
GNU is Not Unix,
PHing Is Not GNU make,
my


Ïà¹ØÎĵµ£º

³õѧPHPµÄ18¸ö»ù´¡Àý³Ì

 
ÈçºÎ´´½¨ÎÒÃǵĵÚÒ»¸öPHPÒ³ÃæÄØ£¿·Ç³£¼òµ¥µÄ£¡Ñ¡ÔñÎÒÃÇʹÓõÄÒ»¸ö×îºÃµÄÉè¼Æ¹¤¾ß£¬µ±È»ÄãÒ²¿ÉÒÔ Ö»Ê¹ÓüÇʱ¾¡£´´½¨Ö®ºó¼ÇµÃÒª±£´æΪÀ©Õ¹ÃûΪPHPµÄÎļþ£¬È»ºó´«µ½ÎÒÃǵķþÎñÆ÷
ÉÏ¡£
¡¡¡¡ÔÚ±àдPHP³ÌÐò֮ǰͨ³£ÎÒÃÇÐèÒªÅäÖÃÎÒÃǵĻ·¾³£¬Ò²¾ÍÊÇ˵·þÎñÆ÷
ÒªÖ§³ÖPHP²ÅÄÜÐа¡
¡¡¡¡Ò»¡¢PHPµÄ»ù±¾½á¹¹£º
¡¡¡¡Ê¹ÓÃIncl ......

PHPnow = Apache + PHP + MySQL + phpMyAdmin

 
PHPnow ÊÇʲô?
Win32 ÏÂÂÌÉ«Ãâ·ÑµÄ Apache + PHP + MySQL »·¾³Ì×¼þ°ü¡£
¼òÒ×°²×°¡¢¿ìËٴ֧³ÖÐéÄâÖ÷»úµÄ PHP »·¾³¡£¸½´ø PnCp.cmd ¿ØÖÆÃæ°å£¬°ïÖúÄã¿ìËÙÅäÖÃÄãµÄÌ×¼þ£¬Ê¹Ó÷dz£·½±ã¡£
PHPnow ÊÇÂÌÉ«µÄ£¬½âѹºóÖ´ÐÐ Init.cmd ³õʼ»¯£¬¼´¿ÉµÃµ½Ò»¸ö PHP + MySQL »·¾³¡£
È»ºó¾Í¿ÉÒÔÖ±½Ó°²×° Discuz!, PHPWind, ......

phpÖеÄÎļþËø

ÎļþËøÓÐÁ½ÖÖ£º¹²ÏíËøºÍÅÅËûËø£¬Ò²¾ÍÊǶÁËø(LOCK_SH)ºÍдËø(LOCK_EX)
ÎļþµÄËøÒ»°ãÕâôʹÓãº
$fp = fopen("filename", "a");   
flock($fp, LOCK_SH) or die("lock error")   
$str = fread($fp, 1024);   
flock($fp, LOCK ......

php¡¢MySqlÔËÐл·¾³

ÕâÀï½éÉÜÒ»¸ö¼¯³É»·¾³ XAMPP¡£
XAMPP ÊÇÒ»¸öÒ×ÓÚ°²×°ÇÒ°üº¬ MySQL¡¢PHP ºÍ Perl µÄ Apache ·¢Ðа档XAMPP µÄÈ··Ç³£ÈÝÒ×°²×°ºÍʹÓãºÖ»ÐèÏÂÔØ£¬½âѹËõ£¬Æô¶¯¼´¿É¡£
ÏÂÔصØÖ·£º
http://www.apachefriends.org/zh_cn/xampp.html
µ½Ä¿Ç°ÎªÖ¹£¬XAMPP ¹²ÓÐÒÔÏÂËÄÖÖ°æ±¾£º
£¨1£©ÊÊÓÃÓÚ Linux µÄ XAMPP
£¨2£©ÊÊÓÃÓÚ Windows µ ......

linux+ngnix+php °²×°ÅäÖÃ

 Èí¼þÏÂÔصØÖ·£º
pcre£ºhttp://www.pcre.org/ 
Nginx£ºhttp://nginx.net/
spawn-fcig: http://redmine.lighttpd.net/projects/spawn-fcgi/news
ÀûÓà wget ÃüÁîÏÂÔØÏàÓ¦µÄ °²×°°ü
²½Öè
1¡¢°²×°pcre
     ngnix ÐèÒª°²×°pcre¿â£º
    wget http://sourceforge.net ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ