phpstudy 中使index.php文件优先于index.html

相信有很多人碰到在根目录同时存在index.html和index.php文件,目的是想默认直接走index.php文件,这个要怎么解决呢?

在phpstudy中有个快捷的设置,如下图,我用框圈起来的内容把index.php 放在最前面,我这个是改过之后的了。

phpstudy 中使index.php文件优先于index.html

有的朋友会说,那我是别的集成环境怎么办,或者不是集成环境,就是apache服务怎么解决,在Apache\conf\httpd.conf文件中,在251行,同理把index.php放在最前面。如果那行没有,搜索DirectoryIndex。

phpstudy 中使index.php文件优先于index.html