在a.php 程序上有个 textarea (内容是动态生成的)的输入框 有以下html 的代码, 请问如何通过php写到 b.html 那个id="right" 里面?
请高手们指点一下 谢谢!
a.php 文件<!-- production rank 1 start -->
<li>
<p class="img" align="center">
<a href="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" target="_blank" title="中文2">
<img src="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" width="200" height="200" alt="中文2" />
</a>
</p>
<p class="sn" align="center">»
<a href="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" title="中文2" target="_blank" >中文2</a>
</p>
<p class="ss" align="center"> </p>
<p class="addo"></p>
</li>
<!-- production rank 1 end --><!-- production rank 2 start -->
.。。b.html 文件<html>
<body>
<div id="content">
<div id="left">
xxxxxxxxx
</div>
<div id="right">
<!-- need to replace content start -->
<!-- need to replace content end --> </div>
</div>
</body>
</html>
请高手们指点一下 谢谢!
a.php 文件<!-- production rank 1 start -->
<li>
<p class="img" align="center">
<a href="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" target="_blank" title="中文2">
<img src="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" width="200" height="200" alt="中文2" />
</a>
</p>
<p class="sn" align="center">»
<a href="http://www.xxxx.com/shopimg/201105/thumb/1304616821.jpg" title="中文2" target="_blank" >中文2</a>
</p>
<p class="ss" align="center"> </p>
<p class="addo"></p>
</li>
<!-- production rank 1 end --><!-- production rank 2 start -->
.。。b.html 文件<html>
<body>
<div id="content">
<div id="left">
xxxxxxxxx
</div>
<div id="right">
<!-- need to replace content start -->
<!-- need to replace content end --> </div>
</div>
</body>
</html>
如果目的是展示代码的话,按楼上的方法,并且中间还要经过htmlspecialchars()函数转义
另外要注意从提交到展示整个过程的编码要保持一致