⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ajax_download.php

📁 jquery+prototype+插件+源码+资料 非常的东西
💻 PHP
字号:
<?php
	/**
	 * delete selected files
	 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
	 * @link www.phpletter.com
	 * @since 22/April/2007
	 *
	 */

	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
	{
			
			$path = $_GET['path'];
			//check if the file size
			$fileSize = @filesize($path);
			
			if($fileSize > getMemoryLimit())
			{//larger then the php memory limit, redirect to the file
				
				header('Location: ' . $path);
				exit;				 
			}else 
			{//open it up and send out with php 
				downloadFile($path);	
				 			
			}
	}else 
	{
		die(ERR_DOWNLOAD_FILE_NOT_FOUND);
	}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -