Просмотр файла sman/set/export.php

Размер файла: 843B
<?php

include_once '../../sman/includs/configurations.php';

$file_opt = 'true';

include_once '../../sman/includs/head.php';

if (isset($_GET['path'])) {

$path = htmlspecialchars($_GET['path']);

if (isset($_FILES['file_up']['tmp_name'])) {

$name = trim($_FILES['file_up']['name']);


if (move_uploaded_file($_FILES['file_up']['tmp_name'], ROOT.$path.'/'.$name) === true)
header("Location: /sman/file.php?path=".$path."/".htmlspecialchars($name)."&ok");

exit;


}

echo '<form action = "?path='.$path.'" method = "POST" enctype = "multipart/form-data">

Выберите файл: <br />

<input name = "file_up" type = "file">

<br />

<input type = "submit" value = "Загрузить">

<br />';

} else {

header("Location: /sman/index.php");

exit;

}


echo '</div>';

include_once '../../sman/includs/foot.php';
?>