Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.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
Php 服务器未显示最新的更改_Php_Wordpress_.htaccess - Fatal编程技术网

Php 服务器未显示最新的更改

Php 服务器未显示最新的更改,php,wordpress,.htaccess,Php,Wordpress,.htaccess,我在Godaddy服务器上有wordpress网站。我的更改不会反映在页面刷新上。当我按CTRL+F5时,它会显示最新的更改。问题是在登录后,它一直显示“登录/注册”按钮,但当我按CTRL+F5时,它开始显示带有注销按钮的用户名。根据我的RND,我尝试了不同的方法,如 在header.php中尝试了以下代码 <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-contro

我在Godaddy服务器上有wordpress网站。我的更改不会反映在页面刷新上。当我按CTRL+F5时,它会显示最新的更改。问题是在登录后,它一直显示“登录/注册”按钮,但当我按CTRL+F5时,它开始显示带有注销按钮的用户名。根据我的RND,我尝试了不同的方法,如

在header.php中尝试了以下代码

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
在htaccess中尝试了代码

<filesMatch "\.(html|htm|js|css|php)$">
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</filesMatch>

FileTag无
标题未设置ETag
标题集缓存控制“最大年龄=0,无缓存,无存储,必须重新验证”
标题集Pragma“无缓存”
标题集过期“1984年1月11日星期三05:00:00 GMT”

但它们都不起作用。有什么建议可以解决这个问题吗?

如果没有更多的细节,很难给出一个可靠的答案来解决您的问题,但您可以尝试一些事情

登录后是否正在刷新页面?
标题('Location:')

你有静态引用吗? 如果您有诸如css或js文件之类的静态文件,您可以在其末尾添加
?v=0.0.1
,以强制更新


是的,我试图找出如何为每个css和js文件动态附加版本
<filesMatch "\.(html|htm|js|css|php)$">
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</filesMatch>