Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在X秒内刷新PHP变量_Php_Jquery_Refresh - Fatal编程技术网

在X秒内刷新PHP变量

在X秒内刷新PHP变量,php,jquery,refresh,Php,Jquery,Refresh,这是我的密码 如何在5秒内刷新$test <?php $test = file_get_contents("test.txt"); ?> <html> <body> <?php echo $test; ?> </body> </html> 你试过谷歌吗???是的,但我在谷歌上找不到解决方案第一个链接它的页面本身重新加载正确, setInterval(function(){ $('body').l

这是我的密码

如何在5秒内刷新
$test

<?php 
  $test = file_get_contents("test.txt");
?>

<html>
   <body>
    <?php echo $test; ?>
  </body>
</html>

你试过谷歌吗???是的,但我在谷歌上找不到解决方案第一个链接它的页面本身重新加载正确,
setInterval(function(){
 $('body').load('test.txt');
}, 5000);