anybody got any good ideas for inserting the entire contents of a file into a <textarea> box??? these files will contain html and php so tags and parenthesis and quotes and all that stuff will most likely be included... currently, i have it using javascript, and it's completely messing up...
here's some example code from it...
<?
$infile = "";
if(isset($_GET['path'])){ $infile = $_GET['path']; }
$inToTextarea = "";
$in_file = file($infile);
foreach($in_file as $line_num => $line){
$inToTextarea .= $line."\n";
}
?>
<script language="javascript">
function InsertIntoTextBox(){
document.editfileform.edittext.value='<?=stripslashes($inToTextarea)?>';
document.editfileform.edittext.focus();
}
</script>
any help would be greatly appreciated. Thanks in advance...
btw... i've tried stripslashes and addslashes and stuff...