Rip*_*aha 2 php xml powerpoint domdocument
我收到以下错误: -
Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically
Run Code Online (Sandbox Code Playgroud)
在下面的行
$xml_handle = DOMDocument::loadXML($xml_datas, LIBXML_NOENT
| LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);
Run Code Online (Sandbox Code Playgroud)
来自以下代码: -
while(($xml_index = $zip_handle->locateName("ppt/slides/slide".$slide_number.".xml")) !== false){
$xml_datas = $zip_handle->getFromIndex($xml_index);
//die("here ====".$slide_number.$xml_datas);
$xml_handle = DOMDocument::loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);
//print_r($xml_handle);die($xml_handle);
$output_text.= strip_tags($xml_handle->saveXML() );
$slide_number++;
}
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏......
使用严格标准,您应该实例化DOMDocument而不是loadXML静态调用:
$xml_handle = new DOMDocument();
$xml_handle->loadXML($xml_datas, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);
Run Code Online (Sandbox Code Playgroud)
这将消除错误.
| 归档时间: |
|
| 查看次数: |
4476 次 |
| 最近记录: |