PHPÏÂÔØÒ³´úÂëÈçºÎÓ¦ÓÃ
¹ØÓÚphpÏÂÔØÒ³ÃæÔÚphpÊÖ²áÖÐÓÐÕâÑùÒ»¶Î²Î¿¼´úÂ룬ÇëÎÊÎÒÒªÈçºÎÐÞ¸ÄËü£¬ÎªÊ²Ã´Ã»ÓÐÏÂÔØ¿òµ¯³öÄØ£¿ÄÜ·ñ¾ÙÀýÒ»ÏÂÒÔÏ´úÂëµÄʵ¼ÊÓÃÀý£¿
<?php
function dl_file($file){
//First, see if the file exists
if (!is_file($file)) { die(" <b>404 File not found! </b>"); }
//Gather relevent info about file
$len = filesize($file);
$filename = basename($file);
$file_extension = strtolower(substr(strrchr($filename,"."),1));
//This will set the Content-Type to the appropriate setting for the file
switch( $file_extension ) {
case "pdf": $ctype="application/pdf"; break;
case "exe": $ctype="application/octet-stream"; break;
case "zip": $ctype="application/zip"; break;
case "doc": $ctype="application/msword"; break;
case "xls": $ctype="application/vnd.ms-excel"; break;
case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
case "gif": $ctype="image/gif"; break;
case "png"
Ïà¹ØÎÊ´ð£º
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......
ʹÓÃPHPµÄexecº¯Êýµ÷ÓÃlinuxµÄshellÃüÁÈçdateÈ¥ÐÞ¸Äʱ¼ä»òshutdownȥʵÏֹػú/ÖØÆô£¬µ«ÊÇ·µ»ØÖµ¶¼ÊÇʧ°ÜµÄ¡£¾¹ý¶à´ÎÊÔÑ飬È϶¨ÊÇûÓÐȨÏÞµÄÎÊÌâ¡£
ËùÒÔ£¬Ð¡µÜÔÚ´ËÇë½Ì¸÷룬ÈçºÎ²ÅÄÜÉèÖÃȨÏÞ£¬µ÷ÓÃlinux shellà ......
¸÷λºÃ,ÏÖÔÚÍøÂçÉÏÖ÷Á÷µÄphp CMSÏñµÛ¹ú,phpcms,Ö¯Ãεȶ¼ÊÇÉú³É¾²Ì¬Ò³ÃæµÄ,¶¼ÊDzÉÓÃÄ£°å,¸ÄÆðÀ´±È½Ï³ÔÁ¦,ÓÐûÓÐÄÇÖÖ¶¯Ì¬µÄ,¸ÄÆðÀ´·½±ãµãµÄ.. лл¸÷λÁË
ÄãÔÚºǫ́ÉèÖÃһϲ»Éú³É¾²Ì¬Ò³Ã棬²ÉÓö¯Ì¬ä¯ÀÀµÄ·½Ê½¾Í¿ÉÒÔÁ ......
<?php
/*
¹¦ÄÜ£ºPHPα¾²Ì¬»¯Ò³ÃæµÄʵÏÖ
¾ßÌåÓ÷¨:
ÀýÈçÁ´½ÓΪ:test.php/year/2006/action/_add.html
mod_rewrite();
$yearn= $_GET["year"];//½á¹ûΪ'2006'
......
ÏÖÓз½·¨£¬¶ÔÓÚÿһ´Î·ÃÎÊ£¬²ÉÓÃ
$handle = fopen($fn, "a");
fwrite($handle, $message);
fclose($handle);
ÀÏ´ó˵ÕâÑùЧÂÊÌ«µÍ¡£
ÊÇ·ñ°Ñ$message×ö¸ö»º´æ£¬µ½ÁËÒ»¶¨ÊýÁ¿ÔÙдÎļþ»áЧ ......