Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Éú³ÉEXCEL£¬¿ÉÇø·ÖÊýÖµÓë×Ö·û´®

ÕâÊǸöÔÚ±ðÈ˵Ļù´¡ÉÏ×öÐ޸ĵĴúÂ룬Ìí¼ÓÁË Åжϵ¥Ôª¸ñÖµÊÇ·ñΪÊýÖµ£¬Êǵϰ£¬½«¸Ãµ¥Ôª¸ñµÄÀàÐÍת³É Number£¬±ÜÃâÉú²úµÄEXCELÖÐû·¨½øÐÐÊýÖµµÄ¼Ó¼õ¡£¡£¡£
<?php
/**
* Simple excel generating from PHP5
*
* This is one of my utility-classes.
*
* The MIT License
*
* Copyright (c) 2007 Oliver Sc ......

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

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

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

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

php·ÖÒ³Àà

<?php
class SubPages{

private $each_disNums;//ÿҳÏÔʾµÄÌõÄ¿Êý
private $nums;//×ÜÌõÄ¿Êý
private $current_page;//µ±Ç°±»Ñ¡ÖеÄÒ³
private $sub_pages;//ÿ´ÎÏÔʾµÄÒ³Êý
private $pageNums;//×ÜÒ³Êý
private $page_array = array();//ÓÃÀ´¹¹Ôì·ÖÒ³µÄÊý×é ......

PHPºÃѧÂð£¿

          ´ó¼ÒºÃ£¬Çë½ÌÒ»¸öÎÊÌ⣬Âé·³ÓÐÀàËÆ¾­ÑéµÄ°ï°ï棬лл¸÷λÁË!
         ±¾ÈËÒÔǰѧ¹ýÁ½ÄêµÄ.NET,ÓÃC#£¬ASP.NET£¬Winfrom,SQLServer×ö¹ý¼¸¸öÍøÕ¾ºÍСÐ͵ĹÜÀíϵͳ¡£
ÏÖÔÚµ½Ò»¼Òй«Ë¾£¬ÒªÇóÎÒѧPHP¡£Âé·³¸ßÊÖÖ¸µãһϣ¬P ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ