在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>

解决方案 »

  1.   

    将a.php的内容 提交到 b.php 使用b.PHP 生成静态文件 b.html.
      

  2.   

    用DOMDocument的LOADHTML加载一下试试
      

  3.   

    把html写入div?如果是内容嫁接,按楼上的方法
    如果目的是展示代码的话,按楼上的方法,并且中间还要经过htmlspecialchars()函数转义
    另外要注意从提交到展示整个过程的编码要保持一致
      

  4.   

    各位大哥 能否给个例子来看看, 好久没弄 php 了