<?php /* * @copyright Leyun internet Technology(Shanghai)Co.,Ltd * @license http://www.dzzoffice.com/licenses/license.txt * @package DzzOffice * @link http://www.dzzoffice.com * @author zyx(zyx@dzz.cc) */ if (!defined('IN_DZZ')) { exit('Access Denied'); } define('NOROBOT', TRUE); $path = empty($_GET['icoid']) ? trim($_GET['path']) : $_GET['icoid']; if ($path = dzzdecode($path)) { IO::download($path, $_GET['filename']); } exit;
//dzzjs形式时 @header("Location: {$icoarr['url']}"); exit; } else { //替换参数 $url = preg_replace("/{(\\w+)}/ie", "cansu_replace('\\1')", $url); //添加path参数; if (strpos($url, '?') !== false && strpos($url, 'path=') === false) { $url .= '&path=' . $_GET['s']; } @header("Location: {$url}"); exit; } } else { //没有可用的打开方式,转入下载; IO::download($path); exit; } } //获取文件流地址 if (!($url = IO::getStream($path))) { exit('获取文件失败'); } if (is_array($url)) { exit($url['error']); } //如果是阻止运行的后缀名时,直接调用; if ($ext && in_array($ext, $_G['setting']['unRunExts'])) { $mime = 'text/plain'; } else { $mime = dzz_mime::get_type($ext);