dongranding3909 2014-10-30 17:48
浏览 54
已采纳

为什么apache localhost目录不起作用?

My apache is not display any webpage what so ever when I am trying to connect to the website I am creating through localhost.

I was told that I should be able to connect through localhost/www/[webpage folder]/index.php but when I do so the error that I receive is:

Not Found

The requested URL /www/wws/index.php was not found on this server.

Its awkward because I can connect to the website/page by using the directory, file:///C:/wamp/www/wws/index.phpbut it does not show any of the code inside of the webpage. It is just blank and solid white. The php include is defiantly setup correctly as I have had another question regarding that and no answers were proven right as I believe it is because of apache. Not sure if it's the conf of the apache folder or what. (I have not touched the conf after installing it)

I'm not sure what it could be because the file is most defiantly there.

Any answers would be appreciated as I need to figure this out to get going on the site.

  • 写回答

2条回答 默认 最新

  • dqg63264 2014-10-30 17:50
    关注

    The http URL does not work because, presumably, the root directory of the site is c:\wamp\www so you should not include www/ in the URL.

    The file URL does not work because PHP is, in this context, a server side programming language and you are accessing the file directly with the browser instead of requesting it from the server.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 maixpy训练模型,模型训练好了以后,开发板通电会报错,不知道是什么问题
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题