日期:2014-05-17 浏览次数:20582 次
DefaultType text/plain <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml </IfModule>
------解决方案--------------------
我在里面创建的项目不能解析PHP文件.会提示连接被重置!或网络已断开.在地址栏输入这个路径只能看到当前目录下的文件.
而根目录的index.php却能正常解析.
如果没有index.php索引文件,你直接打开目录的话 的确是显示文件目录结构的,如果有这个index.php文档,那么apache会先解析index.php文档.这个你可以在apache的配置文件修改
搜索
Options Indexes FollowSymLinks
将Indexes 去掉 保存重启apache 即可.
访问某个文件提示 连接被重置
那就查日志看看具体的错误是什么内容 .这种原因可能有很多,比如你的php出现错误 .打开 php.ini里的错误提示,设置浏览器的(IE的友好错误提示)...