dsiuy42084
2015-11-14 12:55
浏览 125
已采纳

在浏览器中查看php文件?

So I have just downloaded Xampp to learn php. I've played around making a few simple files and I want to view them in the browser. However I'm not completely sure what url I should be typing into chrome to view the page I want.

Here's my file set up:

I have a folder called 'database' saved inside the 'htdocs' folder. Inside the 'database' folder I have a file called 'index.php' that I want to view.

So what url should I be typing into the broswer to view this page:

localhost/htdocs/database/index.php

I think what is confusing me is that I don't know what localhost represents in the url

图片转代码服务由CSDN问答提供 功能建议

所以我刚刚下载了Xampp来学习php。 我玩过几个简单的文件,我想在浏览器中查看它们。 但是我不能完全确定我应该在Chrome中键入什么URL来查看我想要的页面。

这是我的文件设置:

我在'htdocs'文件夹中保存了一个名为'database'的文件夹。 在'database'文件夹中,我有一个名为'index.php'的文件,我想查看。

那么我应该在浏览器中输入什么网页来查看此页面 :

  localhost / htdocs / database / index.php 
   
 
 

我觉得什么令人困惑 我是我不知道localhost在url中表示的是什么

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dsjq6977 2015-11-14 13:01
    已采纳

    Either of this work for you..

    localhost/database/ 
    127.0.0.1/database/
    

    By default, it will look for index.php

    点赞 评论
  • dongping6974 2015-11-14 13:01

    htdocs is your root directory. Type either of these on your browser window to view the file output,

    http://localhost/database/index.php
    http://127.0.0.1/database/index.php
    
    点赞 评论

相关推荐 更多相似问题