Hi all, I need a PHP script that checks the creation date of a file each 5 seconds, if creation date is changed it reload the page via javascript
I' ve tried with:
function verificaData($d ataCreazione)
{
flush();
sleep(5);
flush();
$datacreTemp= filectime('SiSe Fi/SiSeFi.png');
if ($dataCreazione ==$datacreTemp)
{
verificaData($d atacreTemp);
}
else
{
echo'<script>wi ndow.location.r eload();</script>' ;
}
}
I just call the function after the <body> tag.
Why it doesn't work?
What wrong with this?
Thanks.
I' ve tried with:
function verificaData($d ataCreazione)
{
flush();
sleep(5);
flush();
$datacreTemp= filectime('SiSe Fi/SiSeFi.png');
if ($dataCreazione ==$datacreTemp)
{
verificaData($d atacreTemp);
}
else
{
echo'<script>wi ndow.location.r eload();</script>' ;
}
}
I just call the function after the <body> tag.
Why it doesn't work?
What wrong with this?
Thanks.
Comment