开发者

Chrome wants to download index.php [duplicate]

This question already has an answer here: Closed 10 years ago.

Possible Duplicate:

Google Chrome forces download of PHP scripts' source

I'm working on Ubuntu 11.04 with Apache2 and PHP 5.3.5.

In my document root, I have two files: a test.php printing phpinfo() and index.php for a fresh download of CodeIgniter 2.0.2

When I try to visit index.php using chrome (11.0.696.57, not Chromium), it tries to download the file. When I开发者_运维技巧 visit test.php using Chrome, it displays the file correctly.

When I visit these files with Firefox 4.0 on the same machine, they are BOTH displayed correctly.

Anyone else dealt with this before?

It cannot be a permissions issue as FF displays the files correctly with application type text/html.

What am I doing wrong here?


This question apparently describes the same problem, it's apparently cache related.


Your page should probably return 'Content-type: text/html' at the start (followed by a newline). Your webserver otherwise doesn't know if an image, or text or some movie is getting generated by your php script.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜