2009-04-29, 07:16 AM
Hi, I created a php script so I can remotly edit files on my server, the problem I have is that if the file I want to edit has a </textarea> the php script breaks before this and echo's the rest of the file outside of the textarea on the php script so I can't finish editing the file I want to edit.
I spent almost 3 hours today trying to fix this and failed .
Please help, many thanks in advance .
Screenshot of problem:
testFile.php
I spent almost 3 hours today trying to fix this and failed .
Please help, many thanks in advance .
Screenshot of problem:
<?php
$myFile = "testFile.php";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
?>
<form action="ef.php" method="post">
<textarea name="data" cols="40" rows="5">
<?php echo $theData; ?>
</textarea><br>
<input type="submit" value="Submit" />
</form>
testFile.php
<textarea>
lalala
</textarea>
testing