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 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用