<?php
$test = file_get_contents("test.txt");
?>
<html>
<body>
<?php echo $test; ?>
</body>
</html>
This is my code.
How can I refresh $test
in 5 seconds?
<?php
$test = file_get_contents("test.txt");
?>
<html>
<body>
<?php echo $test; ?>
</body>
</html>
This is my code.
How can I refresh $test
in 5 seconds?
Use ajax & setinterval
setInterval(function(){
$('body').load('test.txt');
}, 5000);