将iFrame的内容保存到html文件中


Save contents of iFrame to html file?

我正在使用JavaScript和可编辑的iFrame构建一个富文本编辑器,我想知道如何使用php将iFrame的内容保存到html文件中。

警告链接http://simple.procoding.net/2008.....iWantSimpleLife提供的生成Javascript混淆警报。该站点可能已被感染。

如果我错了,请纠正我,但iframe基本上不是您正在检索的页面吗?

如果是,则file_get_contents(http://php.net/manual/fr/function.file-get-contents.php)应该会成功。

首先,使用Javascript复制iframe的Html文本的内容,然后将它们粘贴到文本区域中的文本中。然后将文本区域的内容提交给PHP脚本,该脚本将其安全地保存在Web服务器上具有html扩展名的文本文件中。

调用PHP文件系统手册http://www.php.net/manual/en/ref.filesystem.php

使用javascript获取内容。http://simple.procoding.net/2008/03/21/how-to-access-iframe-in-jquery/

这花了我大约5分钟到谷歌。