我想從highlight_file寫文本到html textarea ...但不知道如何? 注意:我能夠將屏幕寫入彩色文本,但我希望它可以加載到可以修改文本的框中。 THX如何將highlight_file寫入textarea?
<?php
...
$code = highlight_file($_POST[filename]);//not sure if this works to write to $code
...
?>
<html>
<textarea type="text" name="code" rows="40" cols="120">
<?php echo $code; ?>
</textarea> <!this does not work>
</html>
highlight_file是不好的方式顯示在文本區域因爲它返回與html它會很好用file_get_contents –