谷歌浏览器的力量PHP脚本'源下载 [英] Google Chrome forces download of PHP scripts' source

查看:118
本文介绍了谷歌浏览器的力量PHP脚本'源下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了谷歌浏览器(谷歌浏​​览器7.0.517.41测试版),我无法理解的行为。在某些情况下,谷歌Chrome的下载的的的源$ C ​​$ C 的是从我的服务器,而不是它正在执行请求的PHP脚本。我没有这个问题,卷曲或Firefox;当我请求相同的URL与他们得到正确执行脚本。

I'm experiencing a behaviour of Google Chrome (Google Chrome 7.0.517.41 beta) that I can't understand. In some cases, Google Chrome downloads the source code of the PHP script that is requested from my server instead of it being executed. I don't have this problem with cURL or Firefox; when I request the same URL with them the script is executed properly.

这在我看来相当奇怪,因为我这个应该是服务器的问题,它应该工作一样在每一个浏览器。我想我一定是忽略了一些或谷歌浏览器发送一些不寻常的HTTP头......我不知道。我检查了Apache的配置文件的AddHandler 将AddType 指令,但没有成功。你有什么想法可能导致此?

This seems to me rather odd because I this should be a server issue and it should work the same in every browser. I think I must have overlooked something or Google Chrome is sending some unusual HTTP headers... I don't know. I've checked AddHandler and AddType directives in Apache configuration files with no success. Do you have any idea what might be causing this?

推荐答案

有关此问题的解决方案是清除谷歌浏览器的缓存,这似乎持有缓存太久一些数据。这可能是错误的服务器上,因为它是pviously发送原始PHP code $ P $但是由于缓存这个问题持续了谷歌浏览器它是固定的,即使以后。

The solution for this issue was to clear the Google Chrome's cache which seems to hold some data cached for too long. It was probably wrong on the server as it was sending raw PHP code previously but due to caching this issue persisted for Google Chrome even after it was fixed.

感谢乔恩·克拉姆中的意见。

这篇关于谷歌浏览器的力量PHP脚本'源下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆