$dstname = $_REQUEST['dstname']; $mes = copyFile($filename, $path . "/" . $dstname); alertMes($mes, $redirect); } elseif ($act == "cutFile") { $str = <<<EOF \t<form action="index.php?act=doCutFile" method="post"> \t将文件剪切到:<input type="text" name="dstname" placeholder="将文件剪切到"/> \t<input type="hidden" name="path" value="{$path}" /> \t<input type='hidden' name='filename' value='{$filename}' /> \t<input type="submit" value="剪切文件"/> \t</form> EOF; echo $str; } elseif ($act == "doCutFile") { $dstname = $_REQUEST['dstname']; $mes = cutFile($filename, $path . "/" . $dstname); alertMes($mes, $redirect); } elseif ($act == "上传文件") { //print_r($_FILES); $fileInfo = $_FILES['myFile']; $mes = uploadFile($fileInfo, $path); alertMes($mes, $redirect); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Insert title here</title> <link rel="stylesheet" href="cikonss.css" /> <script src="jquery-ui/js/jquery-1.10.2.js"></script>
$dstname = $_REQUEST['dstname']; $mes = copyFile($filename, $path . "/" . $dstname); alertMes($mes, $redirect); } elseif ($act == 'cutFile') { $str = <<<EOF <form action="index.php?act=doCutFile" method="post"> 将文件剪切到:<input type="text" name="dstname" placeholder="将文件剪切到" /> <input type="hidden" name="filename" value='{$filename}' /> <input type="hidden" name="path" value='{$path}' /> <input type="submit" value="剪切文件" /> </form> EOF; echo $str; } elseif ($act == 'doCutFile') { $dstname = $_REQUEST['dstname']; $mes = cutFile($filename, $path . '/' . $dstname); alertMes($mes, $redirect); } elseif ($act == 'delFile') { $mes = delFile($filename); alertMes($mes, $redirect); } elseif ($act == 'downFile') { $mes = downFile($filename); } elseif ($act == 'renameFolder') { $str = <<<EOF <form action="index.php?act=doRenameFolder" method="post"> 请填写新文件夹的名称:<input type="text" name="newname" placeholder="重命名" /> <input type="hidden" name="path" value="{$path}" /> <input type="hidden" name="dirname" value="{$dirname}" /> <input type="submit" value="重命名" /> </form> EOF;
<?php require_once '../dir.func.php'; require_once '../file.func.php'; require_once '../common.func.php'; //目标目录 $mubiaopath = "../" . $_POST['mubiaopath']; //原路径 $sourcepath = $_POST['path']; //文件名 $filename = "../" . $_POST['filename']; //echo $filename;die(); $mes = cutFile($filename, $mubiaopath); echo "<script>parent.location.href='../file_gl.php?path=" . $sourcepath . "&info=" . $mes . "'</script>";
<?php require_once '../dir.func.php'; require_once '../file.func.php'; require_once '../common.func.php'; //目标目录 $mubiaopath = "../" . $_POST['mubiaopath']; //原路径 $sourcepath = $_POST['path']; //文件名 $folderp = $_REQUEST['folderp']; $filep = $_REQUEST['filep']; $folderp1 = explode(",", $folderp); $filep1 = explode(",", $filep); for ($i = 0; $i < count($folderp1); $i++) { cutFolder("../" . $folderp1[$i], $mubiaopath); } for ($i1 = 0; $i1 < count($filep1); $i1++) { cutFile("../" . $filep1[$i1], $mubiaopath); } echo "<script>parent.location.href='../file_gl.php?path=" . $sourcepath . "&info=操作成功'</script>";