从非txt fopen文件创建文本框

I have the following code that opens a non-txt file and runs through it so it can read the file line by line, i want to create a textbox (using html probably) so i can put my readed text into that but i have no idea how to do it

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <h2>testing</h2>
        <?php
        $currentFile = "pathtest.RET";
        $fp = fopen($currentFile , 'r');
        if (!$fp)
        {
            echo '<p> FILE NOT FOUND </p>';
            exit;
        }
        else
        {
            echo '<p><strong> Arquivo:</strong>  ['. $currentFile. '] </p>';
        }

        $numLinha = 0;
        while (!feof($fp))
        {
            $linha = fgets($fp,300);
            $numLinha = $numLinha + 1;
            echo $linha;
        }      
        fclose($fp);
        $numLinha = $numLinha -1;
        echo '<hr>linhas processadas: ' . $numLinha;
        ?>
    </body>
</html>

i need the textbox area to be in a form so i can define the cols and rows, or there is an way to do it in php ? is there any way to send the readed content to another .php so i can edit the php to an html interface style freely ?

Try echoing the lines between a textarea:

echo "<textarea>";

while (!feof($fp))
{
    $linha = fgets($fp,300);
    $numLinha = $numLinha + 1;
    echo $linha;
};  

echo "</textarea>";

You may use in order to break lines on the textarea:

echo $linha . "
";