404 error on localhost

后端 未结 2 1309
你的背包
你的背包 2021-01-26 20:52

I am trying to use some ajax to send some email. I have done this before using cold fusion and had no issue.

What I am running into is that localhost

相关标签:
2条回答
  • 2021-01-26 21:37

    Based on the error message you provided and the obscurity of the URL you are navigating to on localhost, I suspect the root cause of your issue stems from having two different document roots set up on your development server and production server.

    If I'm right, this can be fixed by changing your development server's document root from C://xampp/htdocs/ to C://xampp/htdocs/3H-Web-Wlements/. With this set, the server will attempt to serve index.php from 3H-Web-Wlements/ instead of from htdocs/.

    The document root setting can be set within Apache's configuration file typically called httpd.conf. If you're using a development setup like XAMPP or MAMP, you likely have a button in the control panel to get to httpd.conf.

    The setting should look like this after the change:

    DocumentRoot C://xampp/htdocs/3H-Web-Wlements/
    

    After making the change, you will need to restart your web server for the changes to take effect.

    0 讨论(0)
  • 2021-01-26 21:51

    Sending email functions on php is much better to test on active server than localhost because localhost needs to configure to support email functions while active server is already set up for this. I also experienced it.

    0 讨论(0)
提交回复
热议问题