【发布时间】:2016-11-30 11:10:19
【问题描述】:
我正在使用这个插件,https://github.com/punkave/phpQuery 来编辑 HTML 内容。
这是我的代码,
//$formdata contains plain HTML
$doc = phpQuery::newDocument($formData);
//Some Editing
$editedData = phpQuery::getDocument($doc->getDocumentID());
//This returns object
这会返回一个对象。有没有办法获得纯 HTML?
【问题讨论】:
-
github.com/punkave/phpQuery/blob/… ,所以尝试将其转换为字符串。
-
@Federkun 不知道怎么用。请你指导我吗?
-
(string) $editedData -
@Federkun 你拯救了我的一天。非常感谢。