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

ÈçºÎÔÚPHPÏÂÔØÎļþÃûÖнâ¾öÂÒÂë


ÈçºÎÔÚPHPÏÂÔØÎļþÃûÖнâ¾öÂÒÂë
CND8ѧԺ
¡¡PHP½Ì³Ì
¡¡·¢²¼ÈÕÆÚ£º2009Äê05ÔÂ23ÈÕ

ͨ¹ý°ÑContent-TypeÉèÖÃΪapplication/octet-stream£¬¿ÉÒ԰Ѷ¯Ì¬Éú³ÉµÄÄÚÈݵ±×÷ÎļþÀ´ÏÂÔØ£¬ÏàÐÅÕâ¸ö´ó¼Ò¶¼»á¡£ÄÇôÓÃContent-DispositionÉèÖÃÏÂÔصÄÎļþÃû£¬Õâ¸öÒ²Óв»ÉÙÈËÖªµÀ°É¡£»ù±¾ÉÏ£¬ÏÂÔسÌÐò¶¼ÊÇÕâôдµÄ£º
<?php$filename = “document.txt”;header(’Content-Type:
application/octet-stream’);header(’Content-Disposition: attachment;
filename=’ . $filename);print
“Hello!”;?>ÕâÑùÓÃä¯ÀÀÆ÷´ò¿ªÖ®ºó£¬¾Í¿ÉÒÔÏÂÔØdocument.txt¡£
µ«ÊÇ£¬Èç¹û$filenameÊÇUTF-8±àÂëµÄ£¬ÓÐЩä¯ÀÀÆ÷¾ÍÎÞ·¨Õý³£´¦ÀíÁË¡£±ÈÈç°ÑÉÏÃæÄǸö³ÌÐòÉÔÉÔ¸Äһϣº
<?php$filename = “ÖÐÎÄ ÎļþÃû.txt”;header(’Content-Type:
application/octet-stream’);header(’Content-Disposition: attachment;
filename=’ . $filename);print
“Hello!”;?>°Ñ³ÌÐò±£´æ³ÉUTF-8±àÂëÔÙ·ÃÎÊ£¬IE6ÏÂÔصÄÎļþÃû¾Í»áÂÒÂë¡£
FF3ÏÂÏÂÔصÄÎļþÃû¾ÍÖ»ÓГÖÐÎÄ”Á½¸ö×Ö¡£Opera 9ÏÂÒ»ÇÐÕý³£¡£
Êä³öµÄheaderʵ¼ÊÉÏÊÇÕâÑù×Ó£º
Content-Disposition: attachment; filename=ÖÐÎÄ ÎļþÃû.txtÆäʵ°´ÕÕRFC2231µÄ¶¨Ò壬¶àÓïÑÔ±àÂëµÄContent-DispositionÓ¦¸ÃÕâô¶¨Ò壺
Content-Disposition: attachment; filename*=”utf8”%E4%B8%AD%E6%96%87%20%E6%96%87%E4%BB%B6%E5%90%8D.txt”¼´£º
filenameºóÃæµÄµÈºÅ֮ǰҪ¼Ó *
filenameµÄÖµÓõ¥ÒýºÅ·Ö³ÉÈý¶Î£¬·Ö±ðÊÇ×Ö·û¼¯(utf8)¡¢ÓïÑÔ(¿Õ)ºÍurlencode¹ýµÄÎļþÃû¡£
×îºÃ¼ÓÉÏË«ÒýºÅ£¬·ñÔòÎļþÃûÖпոñºóÃæµÄ²¿·ÖÔÚFirefoxÖÐÏÔʾ²»³öÀ´
×¢ÒâurlencodeµÄ½á¹ûÓëphpµÄurlencodeº¯Êý½á¹û²»Ì«Ïàͬ£¬phpµÄurlencode»á°Ñ¿Õ¸ñÌæ»»³É+£¬¶øÕâÀïÐèÒªÌæ»»³É%20
¾­¹ýÊÔÑ飬·¢ÏÖ¼¸ÖÖÖ÷Á÷ä¯ÀÀÆ÷µÄÖ§³ÖÇé¿öÈçÏ£º
IE6 attachment; filename=”<URL±àÂëÖ®ºóµÄUTF-8ÎļþÃû>”
FF3 attachment; filename=”UTF-8ÎļþÃû”
attachment; filename*=”utf8”<URL±àÂëÖ®ºóµÄUTF-8ÎļþÃû>”
O9 attachment; filename=”UTF-8ÎļþÃû”
Safari3(Win) òËƲ»Ö§³Ö£¿ÉÏÊö·½·¨¶¼²»ÐÐ
ÕâÑù¿´À´£¬³ÌÐò±ØÐëµÃÕâÑùд²ÅÄÜÖ§³ÖËùÓÐÖ÷Á÷ä¯ÀÀÆ÷£º
<?php$ua = $_SERVER["H


Ïà¹ØÎĵµ£º

PHPÀ©Õ¹C++


Õâ¸öÎĵµ¼òµ¥½éÉÜÁËÔõôʹÓÃC++ΪPHP±àдһ¸öÀ©Õ¹Ä£¿é¡£ÎÒÒѾ­±»Îʼ°Õâ¸öÎÊÌâÎÞÊý´ÎÁË£¬ËùÒÔÎÒ¾ö¶¨ÎªºóÀ´Õßдһ¸ö¼òµ¥µÄHOWTO¡£ÕâƪÎÄÕÂÖ»»á˵Ã÷һЩҪµãºÍ¹Ø¼üÖ®´¦£¬Èç¹ûÄãÏ£ÍûѧϰC++»òPHP£¬Çë²éÔÄÆäËüµÄÎĵµ¡£
˳±ã£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÒ²»á¿´Ò»ÏÂÔÚPHP5ÖÐÔõô°ÑC++ÀàÓ°Éäµ½PHPÖС£ÎÄÕÂÖеÄÀý×Ó¿ÉÒÔÔÚPHP4ºÍPHP5µÄ»·¾³ÏÂÊ¹Ó ......

PHP¿ò¼Ü Yii 1.0.9 ·¢²¼

YiiÊÇÒ»¸ö¸ßÐÔÄܵÄPHP5µÄwebÓ¦ÓóÌÐò¿ª·¢¿ò¼Ü¡£Í¨¹ýÒ»¸ö¼òµ¥µÄÃüÁîÐй¤¾ß yiic ¿ÉÒÔ¿ìËÙ´´½¨Ò»¸öwebÓ¦ÓóÌÐòµÄ´úÂë¿ò¼Ü£¬¿ª·¢Õß¿ÉÒÔÔÚÉú³ÉµÄ´úÂë¿ò¼Ü»ù´¡ÉÏÌí¼ÓÒµÎñÂß¼­£¬ÒÔ¿ìËÙÍê³ÉÓ¦ÓóÌÐòµÄ¿ª·¢¡£
а汾ÐÞÕýÁË´óÁ¿µÄbug£¬¶Ô³¬¹ý20ÏîµÄ¹¦ÄܽøÐÐÁ˸Ľø£»Í¨¹ýɾ³ýÎÞÓÃµÄ SQL JOIN À´ÌáÉýÁËÀÁģʽϹØϵ AR ²éѯµÄÐÔÄÜ¡£
......

PHP»ñȡʱ¼ä´íÎóµÄÐÞÕý·½·¨

PHP»ñȡʱ¼ä´íÎóµÄÐÞÕý·½·¨
   ½ñÌìÔËÐÐPHP³ÌÐòµÄʱºò£¬ºÜÆæ¹Ö£¬ÎªÊ²Ã´PHP»ñÈ¡µÄʱ¼ä±Èʵ¼Êʱ¼äÕûÕûÉÙÁË8Сʱ£¬ÒÔǰҲûעÒâÕâ¸öÎÊÌ⣬×ÜÒÔΪÊÇʱ¼äÏÔʾ´íÁË£¬ÊÇ°²×°Èí¼þµÄÎÊÌ⣬½ñÌìÔÚÍøÉϲéÁËÏÂ×ÊÁÏ£¬Ô­À´ÁíÓÐÔ­Òò¡£
   ÆäʵÕâºÍʱÇøÓйأ¬PHPĬÈÏ»ñÈ¡0ʱÇø¿ªÊ¼µÄʱ¼ä£¬ÖйúÔÚ¶«°ËÇø£¬Òò´Ë£¬ÎÒÃÇÖÐ ......

phpͨÓüì²âº¯Êý¼¯

ÍøÉÏÕÒµ½µÄ£º¹²ÏíÒ»ÏÂ
<?
//¡¾¾¯¸æ¡¿:δ¾­Ðí¿ÉÇëÎðËæ±ãÐÞ¸Ä
//-----------------------------------------------------------------------------------
-------
//-----------------------------------------------------------------------------------
-------
//
// ¡¾ÎļþÃû¡¿: c_check.inc
// ¡¾× ......

PHP CookieÓëSession¿çÓò·ÃÎÊ¡¢´«µÝ


ÍíÉÏÌØÒ⻨Á˸öʱ¼ä£¬×Ô¼º¶¯ÊÖÊÔÁËÏ¡£
ÔÚÏîÄ¿ÖÐÒ»Ö±Åöµ½Cookie¿çÓò·ÃÎʼ°SessionId¿çÓò´«µÝÎÊÌâ
·¶Àý£º
index.php
<?php
include_once('a.php');
session_start();
$_SESSION['k'] = uniqid();
setcookie("sess", session_id(), time()+3600, "/", ".ipggg.com");
echo "index.php<br />\n";
echo $ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ