<?php require_once 'src/Encoder.php'; require_once 'src/Decoder.php'; $iBase = $_POST['base']; $sOption = $_POST['option']; $sText = file_get_contents($_FILES['arquivo']['tmp_name']); if (empty($sText)) { throw new Exception("Erro ao Ler o arquivo"); } if ($sOption == 'encoder') { $oEncoder = new Encoder($iBase, $sText); $sOutputFile = $oEncoder->process(); } else { $oDecoder = new Decoder($iBase, $sText); $sText = $oDecoder->process(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body>