<?php include("news.php"); ?>
Hello, I include a news.php
in my main page index.php
. I want to refresh the news.php
every 30 seconds, but not refresh the main page index.php
, How to partial refresh a include php page? Thanks.
Another way to refresh an include (Valid only if the include only contains variables and their values):
<?php
$config = file_get_contents("news.php");
$config = str_replace("<?php", "", $config);
$config = str_replace("?>", "", $config);
eval($config);
?>