phpÏÂÔØÎļþ´úÂë
Ò»°ãµÄÎļþ°²È«ÏÂÔØ·½·¨¿ÉÒÔʹÓÃÏÂÃæµÄ´úÂë:
1. <?php?
2.
3. $durl = 'file/phpcms2008_o2abf32efj883c91a.iso';
4. $filename = 'phpcms2008_o2abf32efj883c91a.iso';
5. $file = @fopen($durl, 'r');
6. header("Content-Type: application/octet-stream");
7. header("Accept-Ranges: bytes");
8. header("Accept-Length: ".filesize($durl));
9. header("Content-Disposition: attachment; filename=".$filename);
10. echo fread($file,filesize($durl));
11. fclose($file);
12. ?>
µ«ÊÇÎļþÒ»´ó£¨³¬¹ýphp.iniÅäÖõÄÄÚ´æ×î´óÖµ£©£¬ÕâÀï¾Í³öÎÊÌâÁË£¬·þÎñÆ÷»á·Ç³£Õ¼ÓÃCPU×ÊÔ´£¬¸üÖØÒªµÄÊÇÎļþ²»ÄÜÕý³£ÏÂÔØ£¬Ö»ÄÜÏÂÔؼ¸Ê®KbµÄÎļþ£¬Ã÷ÏÔ²»ÊÇÔ¤ÆÚÏëÒªµÄ¡£
1. function download($url, $filename) {
2.
3. // »ñµÃÎļþ´óС, ·ÀÖ¹³¬¹ý2GµÄÎļþ, ÓÃsprintfÀ´¶Á
4. $filesize = sprintf ( "%u", filesize ( $url ) );
5. if (! $filesize) {
6. return;
7. }
8. header ( "Content-type:application/octet-stream\n" ); //application/octet-stream
9. header ( "Content-type:unknown/unknown;" );
10. header ( "Content-disposition: attachment; filename=\"" . $filename . "\"" );
11. header ( 'Content-transfer-encoding: binary' );
12. if ($range = getenv ( 'HTTP_RANGE' )) { // µ±ÓÐÆ«ÒÆÁ¿µÄʱºò£¬²ÉÓÃ206µÄ¶ÏµãÐø´«Í·
13. $range = explode ( '=', $range );
14. $range = $range [1];
15.
16. header ( "HTTP/1.1 206 Partial Content" );
17. header ( "Date: " . gmdate ( "D, d M Y H:i:s" ) . " GMT" );
18. header ( "Last-Modified: " . gmdate ( "D, d M Y H:i:s", filemtime ( $url ) ) . " GMT" );
19. header ( "Accept-Ranges: bytes" );
20. header ( "C
Ïà¹ØÎĵµ£º
»¨ÁËÈýÌìµÄʱ¼ä£¬ÖÕÓÚÀûÓÃphp+mysqlÖÆ×÷Á˸öÔÚÏ߱ʼDZ¾£¬±¾À´ÊÇÔÚÍøÉÏÕÒÁËһЩµ¥»úµÄ¼Çʱ¾£¬
ÎÒ¿¿£¬Òª²»ÊÇÐèҪע²áÂ룬Ҫ²»ÊDz»·ûºÏ×Ô¼ºµÄÐèÇó£¬ÔÙ˵µ¥»úµÄÐèÒªÔÚ±¾µØ°²×°¡£
Ö÷ÒªµÄÄ¿µÄÊÇÓÃÀ´×öÒ»¸ötodo list¹¦ÄÜ£¬Ä¿Ç°Ö§³ÖµÄ¹¦ÄܱȽϼòµ¥£ºÔö¼Ó£¬É¾³ý£¬Í³¼Æ£¬
ÉÏ´«Îļþ£¬ÀûÓÃfckeditor½øÐб༣¬°²È«·½Ãæ×öÁËЩ¼òµ¥´ ......
¿Õ¼ä˵Ã÷£º (À´×ÔÕʺţºwujiapµÄÍƹã)
1¡¢Ö§³ÖASP¡¢PHP¡¢HTML
2¡¢Ö§³ÖFTPÉÏ´«£¨100M£©
3¡¢¼¼ÊõÖ§³Ö--BBSµçÄÔÂÛ̳.
4¡¢Ìṩ50M MySqlÊý¾Ý¿âʹÓÃ.
5¡¢ÌṩÃâ·Ñ¶þ¼¶ÓòÃû
6¡¢Ìṩ¶¥¼¶ÓòÃû°ó¶¨·þÎñ
7¡¢Ö§³Ö¿ØÖÆÃæ°æ¶ÀÁ¢×ÔÖú¹ÜÀí
8¡¢Ãâ·Ñ¿Õ¼äÏÞÖÆIISÁ¬½ÓÊý=(100)
9¡¢¿Õ¼äËٶȿÉÒÔ·ÃÎÊGhostXpÏÂÔØÕ¾²âÊÔ
Èø ......
¸Ðл×÷Õߣ¬ÎÄÕÂÀ´Ô´
http://www.csask.com/blog/?p=108
eclipseÊÇÎҷdz£Ï²»¶µÄIDE£¬¿ªÔ´+Ãâ·Ñ+¹¦ÄÜÇ¿´ó+¿çƽ̨+¿çÓïÑÔ+²å¼þ»úÖÆ£¬ËäÈ»ÓÐʱºòÒ²»áÓÐÕâÑùÄÇÑùµÄÎÊÌ⣬µ«ÊÇ×÷ΪÖ÷Á¦¿ª·¢IDE£¬eclipseÒѾ·Ç³£×ã¹»ÁË¡£
µÚ1²½£¬°²×°JRE£º
sudo apt-get install sun-java6-jre
µÚ2²½£¬ÏÂÔØeclipse£º
http://www.eclipse.or ......
PHPµÄsafe_modeÑ¡ÏîµÄÄ¿µÄÊÇΪÁ˽â¾ö±¾ÕÂËùÊöµÄijЩÎÊÌâ¡£
µ«ÊÇ£¬ÔÚPHP²ãÃæÉÏÈ¥½â¾öÕâÀàÎÊÌâ´Ó¼Ü¹¹ÉÏÀ´¿´ÊDz»ÕýÈ·µÄ£¬ÕýÈçPHPÊÖ²áËùÊö(http://php.net/features.safe-mode)¡£
µ±°²È«Ä£Ê½ÉúЧʱ£¬PHP»á¶ÔÕýÔÚÖ´ÐеĽű¾Ëù¶ÁÈ¡£¨»òËù²Ù×÷£©ÎļþµÄÊôÖ÷½øÐмì²é£¬ÒÔ±£Ö¤Óë¸Ã½Å±¾µÄÊôÖ÷ÊÇÏàͬµÄ¡£
ËäÈ»ÕâÑùȷʵ¿ÉÒÔ·À·¶±¾ÕÂÖÐ ......
http://www.phpip.com/program/php/A62010901P/25588.html
ÕâƪÎÄÕµijö·¢µãÊÇÎÒ¶Ô²å¼þ»úÖƵÄÀí½â£¬¼°ÆäÔÚPHPÖеÄʵÏÖ¡£´Ë·½°¸½öÊDzå¼þ»úÖÆÔÚPHPÖеÄʵÏÖ·½°¸Ö®Ò»£¬Ð´ÏÂÀ´ºÍ´ó¼Ò·ÖÏí£¬»¶Ó´ó¼ÒÒ»ÆðÌÖÂÛ¡£
²å¼þ£¬Ò༴Plug-in£¬ÊÇÖ¸Ò»ÀàÌض¨µÄ¹¦ÄÜÄ£¿é£¨Í¨³£ÓɵÚÈý·½¿ª·¢ÕßʵÏÖ£©£¬ËüµÄÌصãÊÇ£ºµ±ÄãÐèÒªËüµÄʱºò¼¤»îËü£¬²»Ð ......