让time.xml每天生成一次
This commit is contained in:
parent
a702606cdd
commit
c3edc3f083
|
@ -267,6 +267,9 @@ class DataController extends Zend_Controller_Action
|
||||||
*/
|
*/
|
||||||
function timelineAction()
|
function timelineAction()
|
||||||
{
|
{
|
||||||
|
$fn="time.xml";
|
||||||
|
if (!file_exists($fn) || (time()-filemtime($fn)>3600*24))
|
||||||
|
{
|
||||||
$dateformat="D M j Y G:i:s O";
|
$dateformat="D M j Y G:i:s O";
|
||||||
$md = new MetadataTable();
|
$md = new MetadataTable();
|
||||||
$db=$md->getAdapter();
|
$db=$md->getAdapter();
|
||||||
|
@ -286,6 +289,7 @@ class DataController extends Zend_Controller_Action
|
||||||
$fp=fopen('time.xml','w');
|
$fp=fopen('time.xml','w');
|
||||||
fwrite($fp,$timexml);
|
fwrite($fp,$timexml);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
}
|
||||||
//$this->_helper->layout->disableLayout();
|
//$this->_helper->layout->disableLayout();
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue