我使用stylesheet.xslt
和paths.xml
转换某些RSS Feed并将其输出到新创建的文件中fid.xml
此代码几个月前正常运行,我决定今天再次上传。但是我得到了一个
[2012年11月22日20:30:32 UTC] PHP致命错误:第20行/home/..../public_html/..../feeder.php超过30秒的最长执行时间< em>(第20行是转换开始的地方)
<?php
// create an XSLT processor and load the stylesheet as a DOM
$xproc = new XsltProcessor();
$xslt = new DomDocument;
$xslt->load('feeder/stylesheet.xslt'); // this contains the code from above
$xproc->importStylesheet($xslt);
// your DOM or the source XML
$dom = new DomDocument;
$dom -> load('feeder/paths.xml');
// do the transformation
if ($xml_output = $xproc->transformToXML($dom)) {
file_put_contents('fid.xml', $xml_output);
} else {
trigger_error('Oops, XSLT transformation failed!', E_USER_ERROR);
}
?>