ͬһҳÃæ¶à¸öajax ÇëÇó³öÏÖòËÆjs×èÈûµÄÏÖÏó½â¾ö·½°¸
ÔÚÒ»¸öÏîÄ¿ÖÐʹÓÃphpµ÷ÓÃpcntlÄ£¿éʵÏÖ¶à½ø³Ì²¢·¢¶ÓÁÐÈÎÎñ²¢Í¨¹ýjqueryÒì²½»ñÈ¡ºǫִ́Ðнá¹û£¬µ«ÊÇÔÚǰ̨ajaxÂÖѯºǫ́½á¹ûµÄʱºò³öÏÖ×èÈû£¬ÈçͼËùʾ£º
µÚÒ»¸öÇëÇóÊÇÓÃÀ´Æô¶¯ºǫ́¶àÈÎÎñ½ø³ÌdeamonµÄajaxÇëÇó£¬Õâ¸öÇëÇóÓÉÓÚµ÷ÓÃpcntlÅÉÉú×Ó½ø³ÌÖ´ÐÐÈÎÎñ£¬¹ÊÕâ¸öajaxÇëÇó»á³¤Ê±¼ä´¦ÓڵȴýÏìÓ¦µÄ״̬£¬ºóÃæµÄÇëÇóÊÇÿ¸ô400ºÁÃëÇëÇóÒ»´Îºǫ́²éÕÒ½á¹û¡£ÈçͼһËùʾ£¬µÚÒ»¸öÇëÇó·¢Ëͺ󣬺óÃæµÄÇëÇóÒ»Ö±´¦ÓÚ×èÈû״̬£¬µ¼ÖÂsetIntervalÂÖѯµÄÇëÇóÈ«²¿±»holdס¡£µ±µÚÒ»¸öÇëÇóÈÎÎñÈ«²¿Ö´ÐÐÍê±Ïºó£¬ºóÃæµÄÇëÇó»ù±¾ÔÚͳһʱ¿ÌÈ¥ºǫ́ÀÈ¡½á¹û£¬Õâ¸öʱºòÿ¸öÇëÇ󷵻صĽá¹ûÊÇÒ»ÃþÒ»ÑùµÄ£¬Ò²¾ÍÊÇ˵ÂÖѯÒѾ²»´æÔÚʵ¼ÊÒâÒå¡£
ÔÚÍøÉÏÕÒÁËһЩ˵·¨£¬¿Ï¶¨ÁËjQueryÊǾßÓзdz£Ç¿´óÒì²½²¢·¢´¦ÀíÄÜÁ¦£¬Í¬Ê±Ò²ÅųýÁËä¯ÀÀÆ÷µ¼ÖÂ×èÈûµÄ¿ÉÄÜ¡£´ÓһЩÎÄÕÂÖÐÕÒµ½Ò»ÖÖ˵·¨ÊÇÓпÉÄÜsessionÔÚʹÓÃsession fileµÄʱºò»álockס£¬µ¼Ö¶à¸öÇëÇó»áµÈ´ýµÚÒ»¸öÇëÇó½áÊøʹsession fileÊÍ·Å£¬²¢¸ø³öÁËʹÓÃsession_write_closeº¯Êý½â¾öËøÎļþµÄÎÊÌâ¡£
PHP¹Ù·½ÎĵµÊÇÓÐÈçϽâÊÍ£º
End the current session and store session data.
Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done.
ÔÚÇëÇóµÄ¶ÓÁÐÂ߼ǰÃæ¼ÓÉÏsession_write_close()º¯Êý£¬½«sessionÁ¢¼´Ð´Èësession file£¬ÊÍ·ÅÎļþ£¬¶ø²»ÊÇphp scriptÖ´ÐÐÍê±ÏÔÙдÈëfile£¬ÔÙÊÍ·Å£¬ÕâÑù¿ÉÒÔ±ÜÃâfile³¤Ê±¼äËøס£¬¶øµ¼ÖºóÃæÇëÇóµÄÂß¼²»ÄܶÁÈ¡session file¡£
¸ÄÔìºóµÄЧ¹û·Ç³£Ã÷ÏÔ£¬ÂÖѯ½á¹û»Ö¸´Õý³££º
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ