我的代码变老了吗?经过几个月再次使用后,超出了最高执行时间

时间:2012-11-22 20:37:12

标签: php xml xslt

我使用stylesheet.xsltpaths.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);
} 
?>

0 个答案:

没有答案