的.htaccess导致下载所有网页 [英] .htaccess causes all pages to be downloaded

查看:257
本文介绍了的.htaccess导致下载所有网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加以下行的.htaccess

AddType application/x-httpd-php .html .htm

当我尝试加载任何页面就在旁边,我的浏览器尝试下载页面!我究竟做错了什么?

When I try to load any page on the side, my browser tries to DOWNLOAD the page! What am I doing wrong?

谢谢!

推荐答案

最有可能的;你没有加载web服务器的PHP模块。这意味着,则服务器找到应用程序/ X的httpd - PHP文件,它直接传送到客户端,而不是通过一个PHP跨pretor运行它(这将运行任何PHP code和输出文本/ html内容类型)。由于浏览器不包括PHP跨pretors,他们把它作为任何其他未知的内容类型,并提供将它保存到光盘上。

Most likely; you don't have the PHP module loaded for your webserver. This means that then the server finds a application/x-httpd-php file, it passes it directly to the client instead of running it through a PHP interpretor (which would run any PHP code and output a text/html content type). Since browsers don't include PHP interpretors, they treat it as any other unknown content type, and offer to save it to disc.

这篇关于的.htaccess导致下载所有网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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