摘要: 1 public function download($currdir = null){ 2 $file = urldecode($currdir); 3 $file = iconv('UTF-8', "GB2312", $file); 4 if (!file_exists($file)) { 5 $this->error("文件不存在"); ... 阅读全文
posted @ 2018-05-24 16:50 雨筠 阅读(494) 评论(0) 推荐(0) 编辑
摘要: public function edit(){ $file = iconv('UTF-8','GB2312',urldecode(input('file'))); if(empty($file)|| !file_exists($file)){ $this->error('操作异常'); } $arr = ['.PHP', '.CSS', '.JS', '.XM... 阅读全文
posted @ 2018-05-24 16:48 雨筠 阅读(331) 评论(0) 推荐(0) 编辑
摘要: public function renames(){ if(request()->isAjax()){ $file = iconv('UTF-8','GB2312',urldecode(input('file'))); $filename = input('filename'); $newfile 阅读全文
posted @ 2018-05-24 16:43 雨筠 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1、is_dir():检查指定的文件是否是目录 2、scandir():返回指定目录中的文件和目录数组 3、unlink():删除文件,如果删除的文件不存在会报错,加@抑制报错 public function del(){ if(request()->isAjax()){ $file = iconv 阅读全文
posted @ 2018-05-24 16:07 雨筠 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 显示文件用到的函数有 1、urlencode($str):编码URL字符串,便于将字符串编码并将其用于URL的请求部分 2、urldecode($str):解码已经编码的URL字符串,返回解码后的字符串 3、iconv('GB2312','UTF-8',$str):将字符串$str,编码由GB231 阅读全文
posted @ 2018-05-24 15:27 雨筠 阅读(469) 评论(0) 推荐(0) 编辑