0

我想知道是否有更好的方法来编写我的 PHP 站点,而不必总是手动刷新我正在处理的页面。是否有一个程序可以监视文件夹并在发生更改时自动刷新我的浏览器。顺便说一句,我正在使用本地放大器堆栈的本地计算机上进行开发。

4

2 回答 2

1

You can achieve this by ajax. In ajax you can check the changes in database if any new record added you can call

location.replace('');

in ajax success

于 2013-06-29T13:24:27.533 回答
0

Use Ajax poll (checking for status change on server with time intervals) and when the change occurs, either refresh the page with Javascript or replace the part of it to reflect the change.

于 2013-06-29T13:24:34.880 回答