【发布时间】:2016-04-29 06:41:41
【问题描述】:
在这里引用上一个问题HTML Generator: Convert HTML to PlainText and put in a textbox using PHP
现在即使回复产生了预期的结果,我也遇到了一些问题。
我得到了这 3 页:
Page1.php
// This page contain two columns, one for the form that take the
variables, and other one that contain the iframe that must to display the plaintext
Page2.php
// Cutted code that take $_GET variables and store in $_SESSION
$html = file_get_contents('page3.php');
echo '<textarea readonly style="border:none;resize:none" rows="50" cols="116" value="'. $html .'"></textarea>';
Page3.php
// This is the file page3.php that must to be in plaintext, but first
it must take the variables from $_SESSION and complete the code
现在我得到了纯文本文件,但变量没有被传递,因为我已经将它们存储在会话中。我得到的是 $var 而不是值。
文本框只显示文件的一半,不显示<link> 和整个<style> 标签。
【问题讨论】:
-
<textarea>没有value。 -
弗雷德的意思是
echo '<textarea readonly style="border:none;resize:none" rows="50" cols="116">'.$html.'</textarea>'; -
@mplungjan 我在下面发布了一个答案,但老实说,我并不依赖您对此的评论。我正忙着测试它并没有看到它,因为我正在输入它。
-
没问题。我赞成你的回答
-
@mplungjan 谢谢,干杯
标签: php html iframe textarea plaintext