²ÉÓÃPHPʵÏÖ¡±·þÎñÆ÷ÍÆ¡±¼¼ÊõµÄÁÄÌìÊÒ
* ×÷Õß: laruence(http://www.laruence.com)
* ±¾ÎĵØÖ·: http://www.laruence.com/2008/04/16/118.html
* תÔØÇë×¢Ã÷³ö´¦
´«Í³µÄB/S½á¹¹µÄÓ¦ÓóÌÐò£¬¶¼ÊDzÉÓÔ¿Í»§¶ËÀ”½áÊøÀ´ÊµÏÖ¿Í»§¶ËºÍ·þÎñÆ÷¶ËµÄÊý¾Ý½»»»¡£
±¾ÎĽ«Í¨¹ý½áºÏTicks(¿ÉÒԲο´ÎÒµÄÁíÍâһƪÎÄÕ£º¹ØÓÚPHPÄã¿ÉÄܲ»ÖªµÀµÄ£PHPµÄʼþÇý¶¯»¯Éè¼Æ)£¬À´ÊµÏÖÒ»¸ö·þÎñÆ÷ÍƵÄPHPÁÄÌìÊÒ¼òµ¥¹¹Ïë¡£
PHPer£¬ÓÈÆäÊÇÓùýset_cookie, headerµÄ£¬Ò»¶¨¼û¹ýÕâÑùµÄÌáʾÐÅÏ¢£º”Warning: Cannot modify header information – headers already sent by…..”, ÕâÊÇÒòΪͨ¹ýHTTPÐÒéͨÐÅ£¬Êý¾Ý°ü»á°üº¬Á©¸ö²¿·Ö£¬Ò»¸öÊÇHeader,Ò»¸öÊÇdata¡£Ò»°ãÀ´Ëµ£¬¶¼ÊÇÏÈHeader²¿·Ö£¬ÔÚHeaer²¿·ÖÖ¸Ã÷ÁË Data²¿·ÖµÄ³¤¶È£¬È»ºóʹÓÃ\r\n\r\nÀ´±íʾheader²¿·Ö½áÊø£¬½ÓÏÂÀ´ÊÇData²¿·Ö¡£
µ±ÎÒÃÇÓÐÈκÎÊä³öµÄʱºò£¬Header²¿·Ö¾Í·¢ËÍÁË£¬Õâ¸öʱºò£¬ÄãÔÙÏëheaderº¯ÊýÀ´¸Ä±äһЩHeader²¿·ÖµÄÓòÐÅÏ¢£¬¾Í»áµÃµ½ÉÏÃæµÄÌáʾÐÅÏ¢¡£
Ò»¸ö¼òµ¥µÄ°ì·¨¾ÍÊÇʹÓÃoutput_buffering¡£ÈÃËüÀ´»º´æ·þÎñÆ÷µÄÊä³ö£¬²»ÒªÌ«Ô罫Header²¿·Ö·¢¸ø¿Í»§¶Ë¡£
ÄÇô£¬Èç¹û²»Ê¹ÓÃoutput_buffering£¬ÊDz»ÊǾͿÉÒÔʵÏÖ£¬Ã¿µ±·þÎñÆ÷ÓÐÊä³ö£¬¾ÍÁ¢¼´·¢Ë͸ø¿Í»§¶ËÄØ£¿
×ö¸öÈçÏÂÊÔÑ飺
//ÉèÖÃphp.iniÖÐoutput_buffering=0 »òÕßʹÓÃob_end_flush()¹Ø±Õ»º´æ
1. set_time_limit(0);
2. for($i=0;$i<10;$i++){
3. echo "Now Index is :". $i;
4. sleep(1);
5. }
½á¹ûÎÒÃÇ·¢ÏÖ£¬»¹ÊÇÒªµÈµ½½Å±¾È«²¿Ö´ÐÐÍêÒԺ󣬲ÅÄÜÒ»´Î¿´µ½ËùÓеĽá¹û¡£¡£
ΪʲôÄØ£¿
ÕâÊÇÒòΪÎÒÃÇÖ»Êǽâ¾öÁË»º´æÎÊÌ⣬µ«ÊÇ»¹ÓÐÒ»¸ö»º³åÎÊÌ⣬PHP»á»º³å³ÌÐòµÄÊä³ö¡£ËùÒÔ£¬Õâ¸öʱºò£¬ÎÒÃÇ»¹ÐèÒªµ÷Óã¬flush(), À´Ç¿ÖÆʹµÃPHP½«ËùÓеijÌÐòÊä³ö·¢Ë͸ø¿Í»§¶Ë¡£
1. set_time_limit(0);
2. //ÉèÖÃphp.iniÖÐoutput_buffering=0
3. ob_end_flush();//¹Ø±Õ»º´æ
4.
5. set_time_limit(0);
6. for($i=0;$i<10;$i++){
7. echo "Now Index is :". $i;
8. flush();
9. sleep(1);
10. }
ÏÖÔÚÊDz
Ïà¹ØÎĵµ£º
×î½ü·¢ÏֺܶàÍøÕ¾¶¼ÓÐһЩȦÈËÍ·ÏñµÄ¹¦ÄÜ£¬ºóÀ´ÔÚÍøÉÏGGÁËһϣ¬·¢ÏÖÊÇÓÃOpenCVʵÏֵģ¬ÎÒÒ²ÔÚÄÚ²¿·þÎñÆ÷×öÁËһϲâÊÔ£¬Èç¹û¿ÉÒÔʵÏÖ£¬²½ÖèÈçÏ£º
Ò» °²×°
1¡¢°²×°opencv
¹Ù·½ÍøÕ¾£ºhttp://www.opencv.org.cn £¨ÖÐÎİ棩
¾ßÌå°²×°·½·¨¿ÉÒԲο¼¹Ù·½ÍøÕ¾£º
http://www.opencv.org.cn/index.php/%E6%BA%90%E7%A0%81%E7% ......
$_SERVER´æ´¢µ±Ç°·þÎñÆ÷ÐÅÏ¢£¬ÆäÖÐÓм¸¸öÖµÈç$_SERVER["QUERY_STRING"]£¬$_SERVER["REQUEST_URI"]£¬$_SERVER["SCRIPT_NAME"]ºÍ$_SERVER["PHP_SELF"]³£³£ÈÝÒ×»ìÏý£¬ÒÔÏÂͨ¹ýʵÀýÏê½â$_SERVERº¯ÊýÖÐQUERY_STRING£¬REQUEST_URI£¬SCRIPT_NAMEºÍPHP_SELF±äÁ¿Çø±ð£¬ÕÆÎÕÕâËÄÕßÖ®¼äµÄ¹Øϵ£¬±ãÓÚÔÚʵ¼ÊÓ¦ÓÃÖÐÕýÈ·»ñÈ¡ËùÐèÒªµÄÖµ
1£ ......
http://blog.csdn.net/hahawen/archive/2004/05/01/20692.aspx
Èý¡¢ÊµÏÖÄãµÄMode²ã
Model²ã£¬¾ÍÊÇMVCģʽÖеÄÊý¾Ý´¦Àí²ã£¬ÓÃÀ´½øÐÐÊý¾ÝºÍÉÌÒµÂß¼µÄ×°·â£¬½øÐÐËûµÄÉè¼ÆµÄʱºòÉè¼Æµ½Èý¸ö¸ö¸ÅÄî:
------ModelÀà¡£ÊÇʵÌåÀà¡£ÓÃÀ´±£´æÊý¾Ý¿â±í¸ñµÄÖÐÒ»Ìõ¼Ç¼µÄËùÓÐ×ֶεÄÊý¾Ý¡£²¢ÇÒ¿ÉÒÔÑéÖ¤ÕâÌõ¼Ç¼Êý¾ÝµÄÍêÕûÐÔ¡£
------ ......
delphi ±àдµÄcom ¶ÔÏó ÓÃphpµ÷ÓÃ
µÄ
ʵÀý
delphi:
function Tmyxml.Get_xml: WideString;
begin
Get_xml:='wo shi a lei!';
end;
function Tmyxml.Get_xmldata: WideString;
var
xmlStr:string;
begin
xmlStr := '<?xml version="1.0" & ......
ͼƬÑéÖ¤ÂëµÄÔÀíÊÇ·ÀÖ¹¶ñÒâ×¢²á£¬ÊµÏÖ·½·¨
ÑéÖ¤Â룺<input type="text" name="yanzhengma" />
<iframe src="code/middle.php" height="20px" width="65px" frameborder="0" id="chkimg" scrolling="no" style=" margin-top:5px">
</iframe>
<a href="javascript:chkimg.location.reload(); ......