public function _make_file_proxy($file_path) { if (!file_exists($file_path)) { return ''; } if (!$GLOBALS['is_root'] && $GLOBALS['auth']['explorer:fileDownload'] != 1) { return ''; } load_class('mcrypt'); $pass = $GLOBALS['config']['setting_system']['system_password']; $fid = Mcrypt::encode($file_path, $pass, $GLOBALS['config']['settings']['download_url_time']); //文件对外界公开的地址;有效期在user_setting.php中设定;末尾追加文件名为了kod远程下载 $file_name = urlencode(get_path_this($file_path)); return APPHOST . 'index.php?user/public_link&fid=' . $fid . '&file_name=/' . $file_name; }
public function _make_file_proxy($file_path) { if (!file_exists($file_path)) { return ''; } if (!$GLOBALS['is_root'] && $GLOBALS['auth']['explorer:fileDownload'] != 1) { return ''; } load_class('mcrypt'); $pass = $GLOBALS['config']['setting_system']['system_password']; $fid = Mcrypt::encode($file_path, $pass, $GLOBALS['config']['settings']['download_url_time']); //Documents outside public address; valid set of user setting.php; append the file name of the remote download kod $file_name = urlencode(get_path_this($file_path)); return APPHOST . 'index.php?user/public_link&fid=' . $fid . '&file_name=/' . $file_name; }
public function makeFileProxy() { load_class('mcrypt'); $pass = $this->config['setting_system']['system_password']; $fid = Mcrypt::encode($this->path, $pass, 60 * 50 * 24); show_json($fid); }
public function _make_file_proxy($file_path) { if (!file_exists($file_path)) { return ''; } load_class('mcrypt'); $pass = $GLOBALS['config']['setting_system']['system_password']; $fid = Mcrypt::encode($file_path, $pass, $GLOBALS['config']['settings']['download_url_time']); $file_name = urlencode(get_path_this($file_path)); return APPHOST . 'index.php?user/public_link&fid=' . $fid . '&file_name=/' . $file_name; }