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

[ת]PHPÖÐÎÄÂÒÂëµÄ³£¼û½â¾ö·½·¨×ܽá

¡¡PHPÖÐÎÄÂÒÂëÊÇPHP¿ª·¢Öеij£¼ûÎÊÌâÖ®Ò»¡£PHPÖÐÎÄÂÒÂëÓÐʱ·¢ÉúÔÚÍøÒ³±¾Éí£¬ÓÐЩ²úÉúÔÚÓÚMySQL½»»¥µÄ¹ý³ÌÖУ¬ÓÐʱÓë²Ù×÷ϵͳÓйء£ÏÂ
Ãæ½øÐÐÒ»·¬×ܽᡣ
¡¡¡¡Ò».Ê×ÏÈÊÇPHPÍøÒ³µÄ±àÂë
¡¡¡¡1. phpÎļþ±¾ÉíµÄ±àÂëÓëÍøÒ³µÄ±àÂëӦƥÅä
¡¡¡¡a. Èç¹ûÓûʹÓÃgb2312±àÂ룬ÄÇôphpÒªÊä³öÍ·£ºheader(“Content-Type: text/html;
charset=gb2312")£¬¾²Ì¬Ò³ÃæÌí¼Ó£¬ËùÓÐÎļþµÄ±àÂë¸ñʽΪANSI£¬¿ÉÓüÇʱ¾´ò¿ª£¬Áí´æΪѡÔñ±àÂëΪANSI£¬¸²¸ÇÔ´Îļþ¡£
¡¡¡¡b. Èç¹ûÓûʹÓÃutf-8±àÂ룬ÄÇôphpÒªÊä³öÍ· £ºheader(“Content-Type: text/html;
charset=utf-8")£¬¾²Ì¬Ò³ÃæÌí¼Ó£¬ËùÓÐÎļþµÄ±àÂë¸ñʽΪutf-8¡£±£´æΪutf-8¿ÉÄÜ»áÓеãÂé·³£¬Ò»°ãutf-8Îļþ¿ªÍ·»áÓÐBOM£¬
Èç¹ûʹÓÃ
session¾Í»á³öÎÊÌ⣬¿ÉÓÃeditplusÀ´±£´æ£¬ÔÚeditplusÖУ¬¹¤¾ß->²ÎÊýÑ¡Ôñ->Îļþ->UTF-8Ç©Ãû£¬Ñ¡Ôñ×Ü
ÊÇɾ³ý£¬ÔÙ±£´æ¾Í¿ÉÒÔÈ¥µôBOMÐÅÏ¢ÁË¡£
¡¡¡¡2.
php±¾Éí²»ÊÇUnicodeµÄ£¬ËùÓÐsubstrÖ®ÀàµÄº¯ÊýµÃ¸Ä³Émb_substr(ÐèҪװmbstringÀ©Õ¹);»òÕßÓÃiconvתÂë¡£
¡¡¡¡¶þ.PHPÓëMysqlµÄÊý¾Ý½»»¥
¡¡¡¡PHPÓëÊý¾Ý¿âµÄ±àÂëÓ¦Ò»ÖÂ
¡¡¡¡1. ÐÞ¸ÄmysqlÅäÖÃÎļþmy.ini»òmy.cnf£¬mysql×îºÃÓÃutf8±àÂë
¡¡¡¡[mysql]
¡¡¡¡default-character-set=utf8
¡¡¡¡[mysqld]
¡¡¡¡default-character-set=utf8
¡¡¡¡default-storage-engine=MyISAM
¡¡¡¡ÔÚ[mysqld]ϼÓÈë:
¡¡¡¡default-collation=utf8_bin
¡¡¡¡init_connect='SET NAMES utf8'
¡¡¡¡2. ÔÚÐèÒª×öÊý¾Ý¿â²Ù×÷µÄphp³ÌÐòÇ°¼Ómysql_query("set names
'±àÂë'");£¬±àÂëºÍphp±àÂëÒ»Ö£¬Èç¹ûphp±àÂëÊÇgb2312ÄÇmysql±àÂë¾ÍÊÇgb2312£¬Èç¹ûÊÇutf-8ÄÇmysql±àÂë¾ÍÊÇ
utf8£¬ÕâÑù²åÈë»ò¼ìË÷Êý¾Ýʱ¾Í²»»á³öÏÖÂÒÂëÁË
¡¡¡¡Èý.PHPÓë²Ù×÷ϵͳÏà¹Ø
¡¡¡¡WindowsºÍLinuxµÄ±àÂëÊDz»Ò»ÑùµÄ£¬ÔÚWindows»·¾³Ï£¬µ÷ÓÃPHPµÄº¯Êýʱ²ÎÊýÈç¹ûÊÇutf-8±àÂë»á³öÏÖ´íÎ󣬱ÈÈç
move_uploaded_file()¡¢filesize()¡¢readfile()µÈ£¬ÕâЩº¯ÊýÔÚ´¦ÀíÉÏ´«¡¢ÏÂÔØʱ¾­³£»áÓõ½£¬µ÷ÓÃʱ¿ÉÄÜ»á³öÏÖÏÂ
ÃæµÄ´íÎó:
¡¡¡¡Warning: move_uploaded_file()[function.move-uploaded-file]:failed
to open stream: Invalid argument in ...
¡¡¡¡Warning: move_uploaded_file()[function.move-uploaded-file]:Unable
to move '' to '' in ...
¡¡¡¡Warning: filesize() [function.filesize]: stat failed for ... in ...
¡¡¡¡Warning: readfile() [function.r


Ïà¹ØÎĵµ£º

ÔÚ PHP ÖÐÑø³É 7 ¸öÃæÏò¶ÔÏóµÄºÃÏ°¹ß

Èç¹ûÄúÉÐδ´òËãÓà OO Ô­Ôò´´½¨Ó¦ÓóÌÐò£¬ÔòʹÓà PHP µÄÃæÏò¶ÔÏó£¨OO£©µÄÓïÑÔÌØÐÔ£¬Õâ 7 ¸öÏ°¹ß½«°ïÖúÄú¿ªÊ¼ÔÚ¹ý³Ì±à³ÌÓë OO ±à³ÌÖ®¼ä½øÐÐת»»¡£
ÔÚ PHP ±à³ÌÔçÆÚ£¬PHP ´úÂëÔÚ±¾ÖÊÉÏÊÇÏÞÓÚÃæÏò¹ý³ÌµÄ¡£¹ý³Ì´úÂë µÄÌØÕ÷ÔÚÓÚʹÓùý³Ì¹¹½¨Ó¦ÓóÌÐò¿é¡£¹ý³Ìͨ¹ýÔÊÐí¹ý³ÌÖ®¼äµÄµ÷ÓÃÌṩijÖ̶ֳȵÄÖØÓá£
µ«ÊÇ£¬Ã»ÓÐÃæÏò¶ÔÏóµÄÓï ......

php ÑéÖ¤Âë×ܽá

´úÂëÈçÏÂ:
    <?php
       /*   ÍøÕ¾ÑéÖ¤Âë³ÌÐò
        *   ÔËÐл·¾³£º PHP5.0.18 ϵ÷ÊÔͨ¹ý
        *   ÐèÒª gd2 ͼÐοâÖ§³Ö£¨PHP.INIÖÐ php_gd2.dll¿ªÆ ......

PHP»·¾³ÅäÖÃÐĵÃ


PHP»·¾³ÅäÖÃÐĵÃ
ApacheµÄÅäÖÃ
Ê×ÏÈÎÒÔÚhttp://httpd.apache.org/download.cgiϵÄÊÇ“Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.15-win32-x86-no_ssl.msi”¡£°²×°ÄÇÊÇС¶ù¿ÆÀ²£¬ÏÂÒ»²½ÏÂÒ»²½¡£ÎҾͲ»ËµÁË¡£
°²×°Íêºó¾ÍÒª¿ªÊ¼ÅäÖÃÁË£¬ ......

PHPµÄrealpath(...)

PHPµÄrealpath(...)
Author:zfive5(zidong)
Email :zfive5@yahoo.com.cn
Òý×Ó£º
     ×òÌì°ïÈ˸ÄÁËÒ»ÏÂPHP³ÌÐò£¬ÔÚÅäeclipse+php(xdebug)+mysql+apacheºó£¬¾ÍÏÝÈëÒ»²½²½Âþ³¤¶ø·¦Î¶µÄµ÷ÊÔÖУ¬ËäÈ»¹¤¾ßÓÐЩ²»Ì«ºÃÓ㨵«Ò²¶Ôphp»·¾³9ÄêÀ´µÄ½ø²½¸Ðµ½ÐË·Ü£©£¬ ÔÚÕû¸öµ÷ÊÔ¹ý³ÌÖУ¬·¢ÏÖ×Ô¼ºÍêÈ«ÈÃrea ......

Ôõô°Ñpowerdesignerµ¼³öµÄsqlÓÃPHPµ¼ÈëMysQLÊý¾Ý¿â

ÎÒÃÇÖªµÀÓÃpowerdesignerµ¼³öµÄsqlÎļþºó׺Ϊ'.sql'£»ÓÃphpmyadminºÜÈÝÒ×µ¼ÈëMysQLÊý¾Ý¿â£¬µ«ÊÇÓÃPHPÔõôµ¼ÈëÊý¾Ý¿âÄØ?
ÎÒÓÃpowerdesignerÉè¼ÆÒ»¸öÊý¾Ý¿âºóµ¼³ösqlÎļþ£¨Ò»¸öͶƱϵͳ£©Îª'vote.sql'£»
ÎļþÄÚÈÝΪ£¨Ò»Ð©sqlÓï¾äºÍ×¢ÊÍ£©£º
        
/*======================= ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ