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

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

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

$file_opt = 'true';

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

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

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


if (isset($_POST['create_file'])) {

fopen(ROOT.'/'.$path_name.'/'.$_POST['create_file'], "w");


fclose($file);

header("Location: /sman/file.php?path=".$path_name."/".htmlspecialchars($_POST['create_file']));

exit;


}
echo '<div class = "vhod">';
echo '<form action = "?path='.htmlspecialchars($_GET['path']).'" method = "POST">

Имя файла: <br />

<input name = "create_file">

<br />

<input type = "submit" value = "Создать файл">

<br />';

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


} else {

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

exit;

}


echo '</div>';

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