tpl = TEMPLATE."explorer/"; $this->user = $_SESSION['kodUser']; if (isset($this->in['path'])) { //游客访问别人zip,解压到**目录;入口不检测权限 $pathNotCheck = array("explorer.unzip"); $pathNotCheckFlag = in_array(ST.'.'.ACT,$pathNotCheck); if($pathNotCheckFlag){ $GLOBALS['kodPathAuthCheck'] = true; } $this->path = _DIR($this->in['path']); if($pathNotCheckFlag){ $GLOBALS['kodPathAuthCheck'] = false; } $this->_checkSystemPath(); } } public function index(){ $dir = ''; if(isset($this->in['path']) && $this->in['path'] !=''){ $dir = _DIR_CLEAR($_GET['path']); $dir = rtrim($dir,'/').'/'; } $this->assign('dir',$dir); if ($this->config['forceWap']) { $this->display('explorerWap.html'); }else{ $this->display('index.html'); } } //system virtual folder; private function _checkSystemPath(){ if(!in_array(ACT,array('mkfile','mkdir','search', 'pathCuteDrag','pathCopyDrag','pathPast','fileDownload'))){ return; } if( $GLOBALS['kodPathType'] == KOD_USER_SHARE && !strstr(trim($this->in['path'],'/'),'/')){//分享根目录 show_json(LNG('error'),false); } if(in_array($GLOBALS['kodPathType'],array( KOD_USER_FAV, KOD_GROUP_ROOT_ALL, KOD_GROUP_ROOT_SELF ) )){ show_json(LNG('system_path_not_change'),false); } } public function pathInfo(){ $infoList = json_decode($this->in['dataArr'],true); if(!$infoList){ show_json(LNG('error'),false); } foreach ($infoList as &$val) { $val['path'] = _DIR($val['path']); } $data = path_info_muti($infoList,LNG('time_type_info')); if(!$data){ show_json(LNG('not_exists'),false); } //属性查看,单个文件则生成临时下载地址。没有权限则不显示 if (count($infoList)==1 && $infoList[0]['type']!='folder') {//单个文件 $file = $infoList[0]['path']; if( $GLOBALS['isRoot'] || $GLOBALS['auth']["explorer.fileDownloa"]==1 || isset($this->in['viewPage'])){ $data['downloadPath'] = _make_file_proxy($file); } if($data['size'] < 100*1024|| isset($this->in['getMd5'])){//100kb $data['fileMd5'] = @md5_file($file); }else{ $data['fileMd5'] = "..."; } //获取图片尺寸 $ext = get_path_ext($file); if(in_array($ext,array('jpg','gif','png','jpeg','bmp')) ){ $size = ImageThumb::imageSize($file); if($size){ $data['imageSize'] = $size; } } } $data['path'] = _DIR_OUT($data['path']); show_json($data); } public function pathChmod(){ $infoList = json_decode($this->in['dataArr'],true); if(!$infoList){ show_json(LNG('error'),false); } $mod = octdec('0'.$this->in['mod']); $success=0;$error=0; foreach ($infoList as $val) { $path = _DIR($val['path']); if(chmod_path($path,$mod)){ $success++; }else{ $error++; } } $state = $error==0?true:false; $info = $success.' success,'.$error.' error'; if (count($infoList) == 1 && $error==0) { $info = LNG('success'); } show_json($info,$state); } public function mkfile(){ $tplPath = BASIC_PATH.'static/others/newfile-tpl/'; $repeatType = 'skip'; if(isset($this->in['repeat_type'])){ $repeatType = $this->in['repeat_type']; } $new= rtrim($this->path,'/'); $new = get_filename_auto($new,'',$repeatType);//已存在处理 创建副本 Hook::trigger("explorer.mkfileBefore",$new); if(@touch($new)){ chmod_path($new,DEFAULT_PERRMISSIONS); if (isset($this->in['content'])) { file_put_contents($new,$this->in['content']); }else{ $ext = get_path_ext($new); $tplFile = $tplPath.'newfile.'.$ext; if(file_exists($tplFile)){ $content = file_get_contents($tplFile); file_put_contents($new,$content); } } Hook::trigger("explorer.mkfileAfter",$new); show_json(LNG('create_success'),true,_DIR_OUT(iconv_app($new)) ); }else{ show_json(LNG('create_error'),false); } } public function mkdir(){ $repeatType = 'skip'; if(isset($this->in['repeat_type'])){ $repeatType = $this->in['repeat_type']; } $new = rtrim($this->path,'/'); $new = get_filename_auto($new,'',$repeatType);//已存在处理 创建副本 Hook::trigger("explorer.mkdirBefore",$new); if(mk_dir($new,DEFAULT_PERRMISSIONS)){ chmod_path($new,DEFAULT_PERRMISSIONS); Hook::trigger("explorer.mkdirAfter",$new); show_json(LNG('create_success'),true,_DIR_OUT(iconv_app($new)) ); }else{ show_json(LNG('create_error'),false); } } public function pathRname(){ $rnameTo=_DIR($this->in['rnameTo']); if (file_exist_case($rnameTo)) { show_json(LNG('name_isexists'),false); } Hook::trigger("explorer.pathRnameBefore",$this->path,$rnameTo); if(@rename($this->path,$rnameTo)){ Hook::trigger("explorer.pathRnameAfter",$this->path,$rnameTo); show_json(LNG('rname_success'),true,_DIR_OUT(iconv_app($rnameTo)) ); }else{ show_json(LNG('no_permission_write_all'),false); } } public function search(){ if (!isset($this->in['search'])){ show_json(LNG('please_inpute_search_words'),false); } $isContent = intval($this->in['is_content']); $isCase = intval($this->in['is_case']); $ext= trim($this->in['ext']); //共享根目录不支持搜索 if( $GLOBALS['kodPathType'] == KOD_USER_SHARE && strstr($this->path,KOD_USER_SHARE)){ show_json(LNG('path_cannot_search'),false); } Hook::trigger("explorer.searchBefore",$this->path); $list = path_search( $this->path, iconv_system(rawurldecode($this->in['search'])), $isContent,$ext,$isCase); show_json(_DIR_OUT($list)); } public function pathList(){ $userPath = $this->in['path']; if ($userPath=="") $userPath='/'; $list=$this->_path($this->path); //自己的根目录 if($this->path== MYHOME || $this->path==HOME){ $this->_selfRootLoad($list['folderList']); } //群组根目录 if( $list['info']['pathType'] == KOD_GROUP_PATH && !strstr(trim(_DIR_CLEAR($this->in['path']),'/'),'/') ){//自己的根目录 $this->_selfGroupLoad($list['folderList']); } $list['userSpace'] = $this->user['config']; show_json($list); } public function treeList(){//树结构 $app = $this->in['app'];//是否获取文件 传folder|file if (isset($this->in['type']) && $this->in['type']=='init'){ $this->_treeInit($app); } //根树目录请求 switch(trim(rawurldecode($this->in['path']))){ case KOD_USER_FAV: show_json($this->_treeFav(),true); break; case KOD_GROUP_ROOT_SELF: show_json($this->_groupSelf(),true); break; case KOD_GROUP_ROOT_ALL: show_json($this->_groupTree('1'),true); break; default:break; } //树目录组处理 if ( (isset($this->in['tree_icon']) && $this->in['tree_icon']!='group-public') && //公共目录刷新排除 !strstr(trim(rawurldecode($this->in['path']),'/'),'/') && ($GLOBALS['kodPathType'] == KOD_GROUP_PATH|| $GLOBALS['kodPathType'] == KOD_GROUP_SHARE)) { $list = $this->_groupTree($GLOBALS['kodPathId']); show_json($list,true); return; } //正常目录 $path=_DIR($this->in['path']); if (!path_readable($path)) show_json(LNG('no_permission_read'),false); $listFile = ($app == 'editor'?true:false);//编辑器内列出文件 $list=$this->_path($path,$listFile,true); function sortByKey($a, $b){ if ($a['name'] == $b['name']) return 0; return ($a['name'] > $b['name']) ? 1 : -1; } usort($list['folderList'], "sortByKey"); usort($list['fileList'], "sortByKey"); if($path == MYHOME || $path==HOME){//自己的根目录 // $this->_selfRootLoad($list['folderList']); } if ($app == 'editor') { $res = array_merge($list['folderList'],$list['fileList']); show_json($res,true); }else{ show_json($list['folderList'],true); } } //用户根目录 private function _selfGroupLoad(&$root){ foreach ($root as $key => $value) { if($value['name'] == 'share'){ $root[$key] = array( 'name' => LNG('group_share'), 'menuType' => "menu-folder folder-box", 'ext' => "folder-share", 'isParent' => true, 'isReadable' => true, 'isWriteable' => true, 'path' => KOD_GROUP_PATH.':'.$GLOBALS['kodPathId'].'/share/', 'type' => 'folder', 'open' => false, 'isParent' => false ); break; } } $root = array_values($root); } //用户根目录 private function _selfRootLoad(&$root){ foreach ($root as $key => $value) { if($value['name'] == 'share'){ $root[$key] = array( 'name' => LNG('my_share'), 'menuType' => "menu-tree-user", 'ext' => "folder-share", 'isParent' => true, 'isReadable' => true, 'isWriteable' => true, 'path' => KOD_USER_SHARE.':'.$this->user["userID"].'/', 'type' => 'folder', 'open' => false, 'isParent' => false ); break; } } $root = array_values($root); //不开启回收站则不显示回收站 if($this->config['user']['recycleOpen']=="1"){ // $root[] = array( // 'name'=>LNG('recycle'), // 'menuType' =>"menu-recycle-button", // 'ext' =>"recycle", // 'isParent' => true, // 'isReadable' => true, // 'isWriteable' => true, // 'path' => KOD_USER_RECYCLE, // 'type' => 'folder', // 'open' => true, // 'isParent' => false // ); } } private function _treeFav(){ $checkFile = ($this->in['app'] == 'editor'?true:false); $favData=new FileCache(USER.'data/fav.php'); $favList = $favData->get(); $fav = array(); $GLOBALS['kodPathAuthCheck'] = true;//组权限发生变更。导致访问groupPath 无权限退出问题 foreach($favList as $key => $val){ $thePath = _DIR($val['path']); $hasChildren = path_haschildren($thePath,$checkFile); if( !isset($val['type'])){ $val['type'] = 'folder'; } if( in_array($val['type'],array('group'))){ $hasChildren = true; } $cell = array( 'name' => $val['name'], 'ext' => isset($val['ext'])?$val['ext']:"", 'menuType' => "menu-tree-fav", 'path' => $val['path'], 'type' => $val['type'], 'open' => false, 'isParent' => $hasChildren ); if( $cell['type'] == 'folder' && $cell['ext'] == "" ){ $cell['menuType'] = 'menu-tree-folder-fav'; $cell['exists'] = intval(file_exists($thePath)); } if(isset($val['type']) && $val['type']!='folder'){//icon优化 $cell['ext'] = $val['type']; } $fav[] = $cell; } $GLOBALS['kodPathAuthCheck'] = false; return $fav; } private function _treeInit($app){ if ($app == 'editor' && isset($this->in['project'])) { $listProject = $this->_path(_DIR($this->in['project']),true,true); $project = array_merge($listProject['folderList'],$listProject['fileList']); $treeData = array( array('name'=> get_path_this($this->in['project']), 'children' =>$project, 'menuType' => "menu-tree-root", 'ext' => "folder", 'path' => $this->in['project'], 'type' => 'folder', 'open' => true, 'isParent' => count($project)>0?true:false) ); show_json($treeData); return; } $checkFile = ($app == 'editor'?true:false); $fav = $this->_treeFav($app); $publicPath = KOD_GROUP_PATH.':1/'; $groupRoot = systemGroup::getInfo(1); $groupRootName = LNG('public_path'); if($groupRoot && $groupRoot['name'] != 'public'){ $groupRootName = $groupRoot['name']; } if(systemMember::userAuthGroup(1) == false){ $publicPath = KOD_GROUP_SHARE.':1/';//不在公共组则只能读取公共组共享目录 } $listPublic = $this->_path(_DIR($publicPath),$checkFile,true); $listRoot = $this->_path(_DIR(MYHOME),$checkFile,true); if ($checkFile) {//编辑器 $root = array_merge($listRoot['folderList'],$listRoot['fileList']); $public = array_merge($listPublic['folderList'],$listPublic['fileList']); }else{//文件管理器 $root = $listRoot['folderList']; $public = $listPublic['folderList']; //$this->_selfRootLoad($root);//自己的根目录 含有我的共享和回收站 } $rootIsparent = count($root)>0?true:false; $publicIsparent = count($public)>0?true:false; $treeData = array( 'fav'=>array( 'name' => LNG('fav'), 'ext' => "tree-fav", 'menuType' => "menu-tree-fav-root", 'children' => $fav, 'path' => KOD_USER_FAV, 'type' => 'folder', 'open' => true, 'isParent' => count($fav)>0?true:false ), 'myHome'=>array( 'name' => LNG('root_path'), 'menuType' => "menu-tree-root", 'ext' => "tree-self", 'children' => $root, 'path' => MYHOME, 'type' => 'folder', 'open' => true, 'isParent' => $rootIsparent ), 'public'=>array( 'name' => $groupRootName, 'menuType' => "menu-tree-group-root", 'ext' => "group-public", 'children' => $public, 'path' => $publicPath, 'type' => 'folder', 'open' => true, 'isParent' => $publicIsparent ), 'myGroup'=>array( 'name' => LNG('my_kod_group'),//TODO 'menuType' => "menu-tree-group-root", 'ext' => "group-self-root", 'children' => $this->_groupSelf(), 'path' => KOD_GROUP_ROOT_SELF, 'type' => 'folder', 'open' => true, 'isParent' => true ), 'group'=>array( 'name' => LNG('kod_group'), 'menuType' => "menu-tree-group-root", 'ext' => "group-root", 'children' => $this->_groupTree('1'), 'path' => KOD_GROUP_ROOT_ALL, 'type' => 'folder', 'open' => true, 'isParent' => true ), ); //编辑器简化树目录 if($app == 'editor'){ unset($treeData['myGroup']); unset($treeData['group']); unset($treeData['public']); //管理员,优化编辑器树目录 if($GLOBALS['isRoot']==1){ $listWeb = $this->_path(_DIR(WEB_ROOT),$checkFile,true); $web = array_merge($listWeb['folderList'],$listWeb['fileList']); $treeData['webroot'] = array( 'name' => "webroot", 'menuType' => "menu-tree-root", 'ext' => "folder", 'children' => $web, 'path' => WEB_ROOT, 'type' => 'folder', 'open' => true, 'isParent' => true ); } } $result = array(); foreach ($treeData as $key => $value) { //为空则不展示 if( count($value['children'])<1 && in_array($key,array('myGroup','group')) ){//'fav' continue; //$value['isParent'] = false; } $result[] = $value; } show_json($result); } //session记录用户可以管理的组织;继承关系 private function _groupTree($nodeId){//获取组织架构的用户和子组织;为空则获取根目录 $groupSql = systemGroup::loadData(); $groups = $groupSql->get(array('parentID',$nodeId)); $groupList = $this->_makeNodeList($groups); //根群组不显示子群组 if( $nodeId == '1' && !$this->config['settingSystem']['rootListGroup']){ $groupList = array(); } //根群组不显示用户 if( $nodeId == '1' && !$this->config['settingSystem']['rootListUser']){ return $groupList; } //user $userList = array(); $user = systemMember::userAtGroup($nodeId); foreach($user as $key => $val){ $treeIcon = 'user'; if ($val['userID'] == $this->user['userID']) { $treeIcon = 'user-self'; } $userList[] = array( 'name' => $val['name'].' '.LNG('users_share'), 'menuType' => "menu-tree-user", 'ext' => $treeIcon, 'path' => KOD_USER_SHARE.':'.$val['userID'].'/', 'type' => 'folder', 'open' => false, 'isParent' => false ); } return array_merge($groupList,$userList); } //session记录用户可以管理的组织;继承关系 private function _groupSelf(){//获取组织架构的用户和子组织;为空则获取根目录 $groups = array(); foreach ($this->user['groupInfo'] as $groupID=>$val){ if($groupID=='1') continue; $item = systemGroup::getInfo($groupID); if($item){ $groups[] = $item; } } return $this->_makeNodeList($groups); } private function _makeNodeList($list){ $groupList = array(); if(!is_array($list)){ return $groupList; } foreach($list as $key => $val){ $groupPath = KOD_GROUP_PATH; $auth = systemMember::userAuthGroup($val['groupID']); if($auth==false){//是否为该组内部成员 $groupPath = KOD_GROUP_SHARE; $treeIcon = 'group-guest'; }else{ $treeIcon = 'group-self'; } $hasChildren = true; $userList = systemMember::userAtGroup($val['groupID']); if(count($userList)==0 && $val['children']==''){ $hasChildren = false; } $groupList[] = array( 'name' => $val['name'], 'type' => 'folder', 'path' => $groupPath.':'.$val['groupID'].'/', 'ext' => $treeIcon, 'tree_icon' => $treeIcon,//request 'menuType' => "menu-tree-group", 'isParent' => $hasChildren ); } return $groupList; } public function pathDelete(){ $list = json_decode($this->in['dataArr'],true); $userRecycle = iconv_system(USER_RECYCLE); if (!is_dir($userRecycle)){ mk_dir($userRecycle); } $removeToRecycle = $this->config['user']['recycleOpen']; if(!path_writeable($userRecycle) || isset($this->in['shiftDelete']) ){//回收站不可写则直接删除;传入直接删除参数 $removeToRecycle = '0'; } $success=0;$error=0; foreach ($list as $val) { if(!$val['path'] || $val['path'] == '/'){ $error++; continue; } $pathThis = _DIR($val['path']); //不是自己目录的分享列表,不支持删除 if( $GLOBALS['kodPathType'] == KOD_USER_SHARE && $GLOBALS['kodPathId'] != $_SESSION['kodUser']['userID'] && substr_count(trim($val['path'],'/'),'/') <= 1){ //分享根项目 show_json(LNG('no_permission_write'),false); } if(!path_writeable($pathThis)){ $error++; continue; } // 群组文件删除,移动到个人回收站。 // $GLOBALS['kodPathType'] == KOD_GROUP_SHARE || // $GLOBALS['kodPathType'] == KOD_GROUP_PATH || if( $removeToRecycle !="1" || $GLOBALS['kodPathType'] == KOD_USER_RECYCLE ){//回收站删除 or 共享删除等直接删除 Hook::trigger("explorer.pathRemoveBefore",$pathThis); if ($val['type'] == 'folder') { if(del_dir($pathThis)) $success ++; else $error++; }else{ if(del_file($pathThis)) $success++; else $error++; } Hook::trigger("explorer.pathRemoveAfter",$pathThis); }else{ $filename = $userRecycle.get_path_this($pathThis); $filename = get_filename_auto($filename,date('_H-i-s'),'folder_rename');//已存在则追加时间 if (move_path($pathThis,$filename,'',$this->config['user']['fileRepeat'])) { $success++; }else{ $error++; } } } $state = $error==0?true:false; $info = $success.' success,'.$error.' error'; if ($error==0) { $info = LNG('remove_success'); } show_json($info,$state); } private function _clearTemp(){ $path = iconv_system(USER_TEMP); $time = @filemtime($path); Hook::trigger("explorer.pathRemoveAfter",$path); if(time() - $time > 600){//10min without updload del_dir($path); mk_dir($path); } } public function pathDeleteRecycle(){ $userRecycle = iconv_system(USER_RECYCLE); if(!isset($this->in['dataArr'])){ if (!del_dir($userRecycle)) { show_json(LNG('remove_fali'),false); }else{ mkdir($userRecycle); $this->_clearTemp(); show_json(LNG('recycle_clear_success'),true); } } $list = json_decode($this->in['dataArr'],true); $success = 0;$error = 0; foreach ($list as $val) { $pathFull = _DIR($val['path']); Hook::trigger("explorer.pathRemoveBefore",$pathFull); if ($val['type'] == 'folder') { if(del_dir($pathFull)) $success ++; else $error++; }else{ if(del_file($pathFull)) $success++; else $error++; } Hook::trigger("explorer.pathRemoveAfter",$pathFull); } if (count($list) == 1) { if ($success) show_json(LNG('remove_success')); else show_json(LNG('remove_fali'),false); }else{ $code = $error==0?true:false; show_json(LNG('remove_success').$success.'success,'.$error.'error',$code); } } public function pathCopy(){ session_start();//re start $theList = json_decode($this->in['dataArr'],true); foreach ($theList as $key => $value) { _DIR(rawurldecode($value['path']));//检测来源权限 } $_SESSION['pathCopy']= json_encode($theList); $_SESSION['pathCopyType']='copy'; show_json(LNG('copy_success')); } public function pathCute(){ session_start();//re start $theList = json_decode($this->in['dataArr'],true); foreach ($theList as $key => &$value) { $value['path'] = rawurldecode($value['path']); _DIR($value['path']); } $_SESSION['pathCopy']= json_encode($theList); $_SESSION['pathCopyType']='cute'; show_json(LNG('cute_success')); } public function pathCuteDrag(){ $clipboard = json_decode($this->in['dataArr'],true); $pathPast=$this->path; $GLOBALS['beforePathType'] = $GLOBALS['kodPathType']; $GLOBALS['kodBeforePathId'] = $GLOBALS['kodPathId']; if (!path_writeable($this->path)) show_json(LNG('no_permission_write'),false); $success=0;$error=0;$data = array(); foreach ($clipboard as $val) { $pathCopy = _DIR($val['path']); $filename = get_path_this($pathCopy); $autoPath = get_filename_auto($pathPast.$filename,'',$this->config['user']['fileRepeat']); Hook::trigger("explorer.pathMoveBefore",$pathCopy,$autoPath); if (move_path($pathCopy,$autoPath,'',$this->config['user']['fileRepeat'])) { $success++; Hook::trigger("explorer.pathMoveAfter",$pathCopy,$autoPath); $data[] = _DIR_OUT(iconv_app($autoPath)); }else{ $error++; } } $state = $error==0?true:false; $msg = $success.' success,'.$error.' error'; if($error == 0){ $msg = LNG('success'); } show_json($msg,$state,$data); } public function pathCopyDrag(){ $clipboard = json_decode($this->in['dataArr'],true); $pathPast=$this->path; $GLOBALS['beforePathType'] = $GLOBALS['kodPathType']; $GLOBALS['kodBeforePathId'] = $GLOBALS['kodPathId']; if (!path_writeable($this->path)) show_json(LNG('no_permission_write'),false); $success=0;$error=0;$data = array(); foreach ($clipboard as $val) { $pathCopy = _DIR($val['path']); $filename = get_path_this($pathCopy); $autoPath = get_filename_auto($pathPast.$filename,'',$this->config['user']['fileRepeat']); if ($this->in['filename_auto']==1 && trim($autoPath,'/') == trim($pathCopy,'/')) { $autoPath = get_filename_auto($pathPast.$filename,'','folder_rename'); } Hook::trigger("explorer.pathMoveBefore",$pathCopy,$autoPath); if(copy_dir($pathCopy,$autoPath)){ $success++; Hook::trigger("explorer.pathMoveAfter",$filename); $data[] = _DIR_OUT(iconv_app($autoPath)); }else{ $error++; } } $state = $error==0?true:false; $msg = $success.' success,'.$error.' error'; if($error == 0){ $msg = LNG('success'); } show_json($msg,$state,$data); } public function clipboard(){ if(isset($this->in['clear'])){ session_start(); $_SESSION['pathCopy'] = json_encode(array()); $_SESSION['pathCopyType'] = ''; return; } $clipboard = json_decode($_SESSION['pathCopy'],true); if(!$clipboard){ $clipboard = array(); } show_json($clipboard,true,$_SESSION['pathCopyType']); } public function pathPast(){ if (!isset($_SESSION['pathCopy'])){ show_json(LNG('clipboard_null'),false,array()); } $pathPast=$this->path;//之前就自动处理权限判断; session_start();//re start $error = ''; $data = array(); $clipboard = json_decode($_SESSION['pathCopy'],true); $copyType = $_SESSION['pathCopyType']; $GLOBALS['beforePathType'] = $GLOBALS['kodPathType']; $GLOBALS['kodBeforePathId'] = $GLOBALS['kodPathId']; if (!path_writeable($pathPast)) show_json(LNG('no_permission_write'),false,$data); if ($copyType == 'copy') { }else{ $_SESSION['pathCopy'] = json_encode(array()); $_SESSION['pathCopyType'] = ''; } session_write_close(); $GLOBALS['kodPathAuthCheck'] = true;//粘贴来源检测权限;和粘贴到目标位置冲突 $listNum = count($clipboard); if ($listNum == 0) { show_json(LNG('clipboard_null'),false,$data); } for ($i=0; $i < $listNum; $i++) { $pathCopy = _DIR($clipboard[$i]['path']); _DIR($this->in['path']);//重置pathType等数据 $filename = get_path_this($pathCopy); $filenameOut = iconv_app($filename); if (!file_exists($pathCopy)){ $error .= "