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 软件定义网络mininet和onos控制器问题
  • ¥15 微信小程序 用oss下载 aliyun-oss-sdk-6.18.0.min client报错
  • ¥15 ArcGIS批量裁剪
  • ¥15 labview程序设计
  • ¥15 为什么在配置Linux系统的时候执行脚本总是出现E: Failed to fetch http:L/cn.archive.ubuntu.com
  • ¥15 Cloudreve保存用户组存储空间大小时报错
  • ¥15 伪标签为什么不能作为弱监督语义分割的结果?
  • ¥15 编一个判断一个区间范围内的数字的个位数的立方和是否等于其本身的程序在输入第1组数据后卡住了(语言-c语言)
  • ¥15 Mac版Fiddler Everywhere4.0.1提示强制更新
  • ¥15 android 集成sentry上报时报错。