Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta charset="UTF-8">
- </head>
- <body>
- <?php
- /**
- * @param $select
- * @return bool
- */
- function selectTemplate($select)
- {
- if(empty($select)){
- echo 'File name is empty';
- return false;
- }
- $file = $select . 'T.txt';
- $fileContent = file_get_contents($file);
- if(!$fileContent){
- echo 'File not found';
- return false;
- }
- echo $fileContent;
- if (isset($_POST['FIO'])) {
- echo 'fio:' . $_POST['FIO'];
- } else{
- echo 'fio not found';
- }
- }
- if (isset($_POST['submit'])) {
- selectTemplate($_POST['s']);
- } else {
- $homepage = file_get_contents('counter.txt');
- echo $homepage;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement