phpÖÐswfuploadÉÏ´«²»ÄÜÅжϵǼ״̬.
ÔÚÏîÄ¿Öн«ÔÓеÄÉÏ´«¸ÄΪflash¶àÎļþÉÏ´«,µ«ÊÇÕâÆäÖÐÓöµ½Á˸öºÜÓôÃƵÄÎÊÌâ,µ±ÓÐ×öÓû§ÅжÏʱºò,˵°×Á˾ÍÊÇÅжÏcookieµÄʱºò,»ñÈ¡µ½µÄÖµ×ÜÊÇ¿Õ,µ¼ÖÂ×ÜÊÇÈÏΪÓû§Î´µÇ¼....
ºóÀ´ÉÏÍø²éÁËÏÂ,ÕÒµ½Ò»ÆªÎÄÕÂ:
СÐÄswfupload µÄcookie Bug
ʹÓÃSWFUploadµÄʱºòÒ»¶¨ÒªÐ¡ÐÄcookie
bug£ºÔÚ·ÇIEÄÚºËÄں˵Ää¯ÀÀÆ÷ÏÂʹÓÃSWFUploadÉÏ´«Îļþʱ£¬¸ÃÇëÇó»áºöÂÔ×ÔÉíä¯ÀÀÆ÷ÖеÄËùÓÐcookie
£¬Ö»
ȇ
½«IEä¯ÀÀÆ÷ϵÄÊôÓÚ¸ÃÓòµÄ³Ö¾Ãcookie(persistent cookies)·¢Ë͵½·þÎñ¶Ë£¬·Ç³Ö¾Ãcookie£¨ Session only£©²»»á±»·¢ËÍ¡£Òź¶µÄÊÇ´ËBug²¢·ÇÊÇSWFUploadÄÚ²¿ÊµÏÖµÄÎÊÌ⣨ËùÓеÄ
FlashÉÏ´«¶¼»á´æÔÚ´Ëbug£©£¬¶øÊÇFlashPlayerµÄbug£¬ËùÓÐʹÓÃFileReferenceÀàÉÏ´«Îļþʱ»á´æÔÚ´ËÎÊÌâ¡£ÐÒÔ˵ÄÊÇÎÒÃÇÓÐ
°ì·¨ÈÆ¿ª´ËÏÝÚå¡£
¡¡¡¡¼ÙÉèÒ»ÖÖʹÓó¡¾°£¬Óû§µÇ¼ϵͳÒÔºó£¬ÎÒÃÇ»áÔÚcookieÖÐдÈëÒ»¸ö·Ç³Ö¾ÃµÄkeyÖµÀ´ÅжÏÓû§Éí·Ý¡£µ±Óû§Ê¹ÓÃSWFUploadÉÏ´«Îļþ
µÄʱºò£¬·þÎñ¶Ë³ÌÐòͨ¹ýRequesetÖеÄcookieÀ´ÅжÏÓû§Éí·Ý¡£ÔÚIEÏÂÎÒÃǵŦÄÜÕý³££¬µ«ÔÚFFÏÂÄã»á·¢ÏÖ·þÎñ¶Ë½Å±¾´ÓRequestÖÐÈ¡µ½
µÄcookieÊǿյģ¬Õâ¾ÍÊǺܶàÈËÓöµ½µÄcookie¶ªÊ§¡£Ç°ÃæÎÒÒ²Ìáµ½ÁË·ÇIEÄں˵Ää¯ÀÀÆ÷ºöÂÔÁË×ÔÉíµÄËùÓÐcookie¡£
¡¡¡¡¼ÙÈçÓû§Í¬Ê±ÔÚIEϵǼÁËÁíÍâÒ»¸öÕ˺ţ¬²¢ÇÒÑ¡ÔñÁ˼ÇסÕ˺ţ¬ÄÇôÎÒÃǵijÌÐòÂß¼¿ÉÄÜ»áдÈëÒ»¸ö³Ö¾ÃµÄkeyÖµ¡£È»ºóÓû§ÔÚFFÏÂÉÏ´«ÕÕƬ£¬
·þÎñ¶ËÊǽÓÊܵ½cookieÖеÄkeyÖµÁË£¬µ«Òź¶µÄÊÇ´ËkeyÊÇIEϵǼÕ˺ŵÄcookie£¬Ò»²»Ð¡ÐÄÕâ¾ÍÔì³ÉÁËÓû§Éí·ÝÅжϴíÎóµÄbug£¬AÓû§´«
ÁËÕÅÕÕƬ¾ÓÈ»ÊÇÊôÓÚBÓû§µÄ¡£
¡¡¡¡½â¾ö·½·¨£º
¡¡¡¡ÐÒÔ˵ÄÊÇAS3ÌṩµÄURLRequest¶ÔÏóÀ´°ü×°¿Í»§¶ËÇëÇó£¬ÎÒÃÇ¿ÉÒÔÉÏ´«ÎļþµÄͬʱ£¬¸øÇëÇóÌí¼ÓPOSTÖµ¶Ô¡£Òò´Ëµ±ÎÒÃǵÄÉÏ´«³ÌÐòÐèÒª
ÒÀÀµ¿Í»§¶ËcookieµÄʱºò£¬ÎÒÃÇ¿ÉÒÔÔÚÉÏ´«¿ªÊ¼Ç°Ê¹ÓÃJS½«ÎÒÃÇÐèÒªµÄcookie¶ÁÈ¡³öÀ´£¬È»ºóʹÓÃSWFUploadÌṩµÄ
addPostParam·½·¨Ìí¼Óµ½POSTÖÐÈ¥£¬·þÎñ¶Ë´ÓPOSTÖнÓÊÜËùÐèÒªµÄ"cookie"Öµ¼´¿É£¬²»ÔÙÒÀÀµRequestÖеÄcookie»úÖÆ
¡£
×ܽá:
SWFUpload ÀûÓà flash ×÷ ajax ʽºǫ́ÎļþÉÏ´«£¬
Ìṩǿ´óʼþ¶©ÔÄ»úÖÆ¡£²»ÐÒµÄÊÇ£¬ºÜ¶àʱºò½ÓÊÕÎļþÉÏ´«Êý¾ÝµÄ´úÂëÐèÒª¸ù¾Ýµ±Ç°sessionÀ´½øÐÐȨÏÞ´¦Àí¡£ÔÚIEÖÐûʲôÎÊÌ⣬ÔÚ FireFox
ÖлáÎÞ·¨»ñÈ¡ Session£¬ÔÒòÓ¦¸Ã ÊÇflash´¦ÀícookieµÄ·½Ê½ÓÐËù²»Í¬£¬µ¼ÖÂÔÚ FireFox ÖÐ SWFUpload
ÎÞ·¨postµ±Ç°Óû§µÄcookieÐÅÏ¢µ½·þÎñ¶Ë£¬ÕâµãÔÚ SWFUpload µÄ¹Ù·½ÉÏÓÐ˵
Ã÷
¡£
Ïà¹ØÎĵµ£º
ÍƼöСÇÉµÄ PHP ¿ò¼Ü
CodeIgniter ÊÇÒ»¸öСÇɵ«¹¦ÄÜÇ¿´óµÄ PHP ¿ò¼Ü£¬×÷Ϊһ¸ö¼òµ¥¶ø“ÓÅÑÅ”µÄ¹¤¾ß°ü£¬Ëü¿ÉÒÔΪ PHP ³ÌÐòÔ±½¨Á¢¹¦ÄÜÍêÉÆµÄ Web Ó¦ÓóÌÐò¡£Èç¹ûÄãÊÇÒ»¸öʹÓù²ÏíÖ÷»ú£¬²¢ÇÒΪ¿Í»§ËùÒªÇóµÄÆÚÏÞ¶ø·³ÄյĿª·¢ÈËÔ±£¬Èç¹ûÄãÒѾÑá¾ëÁËÄÇЩɵ´ó±¿´ÖµÄ¿ò¼Ü.
ÀïÃæ°üº¬ÁËÈÕ³£ËùÐèÒªµÄÀà¿â£¬´úÂ뾫¼ò¡£ºÜÊ ......
Ò»²¨ÈýÕÛ°¡£¬ÀÏÊÇÍü¼Ç´òµ¥´Ê
<body bgcolor="#0080FF"" >
<form action="bbs.php" method="post" name="Form">
<table border=0 cellpadding=2 cellspacing=0 >
<tr>
<td align=right>Ãû×Ö£º</td>
<td><input type=text size=40 ......
“^The” : ÒÔ”The”¿ªÍ·
“of despair$” : ÒÔ”of despair”½áβ
“^abc$” : ×Ö·û´®”abc”
“notice” : °üº¬”notice”µÄ×Ö·û´®
¾ÍÏñ×îºóÒ»¸öÀý×ÓÒ»Ñù£¬Èç¹ûûÓж¨Òå±ß ......
//Èç¹û$waitAckSecΪ0£¬Ôò·µ»Ø³É¹¦·¢Ë͵Ä×Ö½ÚÊý
//Èç¹û$waitAckSec´óÓÚ0£¬Ôò·µ»Ø·¢Ëͺó½ÓÊÕµ½µÄÄÚÈÝ
//ÈκÎÇé¿öÏ£¬Ê§°Ü¶¼·µ»ØFALSE
function SendUDP($host, $port, $buff, $waitAckSec=0)
{
$result = FALSE;
$socket = ($result=@socket_create(AF_INET, SOCK_DGRAM, SOL_U ......