Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- mb_internal_encoding('utf-8');
- define('TITLE','Добавить статью');
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style>
- #add
- {
- height:50px;
- width:250px;
- float:right;
- }
- form
- {
- width:500px;
- }
- </style>
- <title><?php echo TITLE; ?></title>
- </head>
- <body>
- <?php
- //file upload on main page/главная страница - форма и загрузка ЧАСТЬ 1
- if (isset($_POST['name'])) {
- move_uploaded_file($_FILES['file']['tmp_name'],'add_article_form.php' . $_POST['name'] . '.txt');
- echo 'Файл загружен с именем ' . $_POST['name'] . '.txt';
- }
- echo '<br>' ;
- echo '<br>' ;
- ?>
- <form action = "add_article_form.php" method = "POST">
- <input id = "add" type = "submit" value="Добавить статью">
- </form>
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment