Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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µÄ»·¾³ÏÂÊ¹Ó ......

JSP/PHPÔËÓÃÏê½â

1£¬DateTimeÀàÐÍÊý×Ö 
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º 
µ±Ç°Ê±¼äSystem.DateTimeµÄ=ÐÂSystem.DateTimeµÄ£¨£©; 
1.1Сʱ·ÖÖÓµ±Ç°ÈÕÆÚÃ룬µ±Ç°Ê±¼ä= System.DateTime.Now; 
1.2¼ì²é±¾Äê¶ÈÁ®ÕþÄê= currentTime.Year; 
1.3µ±Ç°Ô·ÝÁ®Õþ¸öÔÂ= currentTime.Month; 
1,4²ÉÈ¡µ±ÌìÁ®ÕþÌì= currentTime.Day;&n ......

ÄãÊÇÓÅÐãµÄPHP³ÌÐòÔ±Âð£¿

    ÓÅÐãµÄPHP´úÂëÓ¦¸ÃÊǽṹ»¯µÄ¡£´ó¶ÎµÄ´úÂëÓ¦¸Ã±»·Ö¸îÕûÀí³ÉÒ»¸ö¸öº¯Êý»ò·½·¨£¬¶øÄÇЩ²»ÆðÑÛµÄС¶Î´úÂëÔòÓ¦¸Ã¼ÓÉÏ×¢ÊÍ£¬ÒÔ±ãÈÕºóÇå³þËüÃǵÄÓÃ;¡£
¶øÇÒÓ¦¸Ã¾¡¿ÉÄܵذÑǰ̨´úÂëÈçHTML¡¢CSS¡¢JavascriptµÈ´Ó³ÌÐòÖзÖÀë³öÀ´¡£PHPµÄÃæÏò¶ÔÏó±à³ÌÌØÐÔ¿ÉÒԺܺõذïÖú³ÌÐòÔ±½«´úÂëÕûÀíÓÐ
Ðò¡£
  &n ......

phpÎļþϵͳº¯Êý¿â

basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......

phpÁ¬½Óaccess


phpÁ¬½Óaccess
 
 
$conn=new COM("ADODB.Connection");
$dsn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=".realpath("data.mdb").";Uid=Admin; Pwd=BDC2002Data;";
$conn->open($dsn); 
$sql="select * from dict"; 
$rs=$conn->Execute($sql);
$row="0";
while(!$rs->EO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ