search

Home  >  Q&A  >  body text

php - localhost shows 404

Direct localhost displays 404, but localhost/test.php can open the file. What's going on?
I searched on Baidu and said I should comment out this sentence. I commented it out and restarted it, but it still didn’t work. I used wamp

#Include conf/extra/httpd-vhosts.conf
怪我咯怪我咯2827 days ago835

reply all(2)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 13:06:58

    The root directory of the website is generally the www directory. Does it have files such as index.{html, php, htm}? By default, localhost accesses files such as index.{html, php, htm}. If not, a 404 error will be generated, but specify Localhost/test.php will access the specified file.

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 13:06:58

    You haven’t configured a default page, such as index.php

    reply
    0
  • Cancelreply