如何打开一个名为 index.php 的文件,该文件位于 i xampp 的 htdocs/project1 文件夹中?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17720210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 16:20:04  来源:igfitidea点击:

how to open a file named index.php which is in htdocs/project1 folder i xampp?

php

提问by Udayraj Khuman

I have one folder named project1 in htdocs folder path is "C:\xampp\htdocs\project1" and i have created index.php file in "project1" folder. How to open this file in browser or in local host?

我在 htdocs 文件夹路径中有一个名为 project1 的文件夹是“C:\xampp\htdocs\project1”,我在“project1”文件夹中创建了 index.php 文件。如何在浏览器或本地主机中打开此文件?

回答by Robert

You can use:

您可以使用:

http://localhost/project1

or

或者

http://127.0.0.1/project1

in the address bar of your browser.

在浏览器的地址栏中。

回答by JohnnyFaldo

If you can't access it via

如果您无法通过

http://localhost/project1

then open XAMPP control panel and make sure Apache,MYSQL (and any other you require) are running (have a green tick to the left of them).

然后打开 XAMPP 控制面板并确保 Apache、MYSQL(以及任何其他您需要的)正在运行(在它们的左侧有一个绿色的勾号)。

If they don't then click 'Start' to begin running them. It should then work.

如果没有,则单击“开始”以开始运行它们。然后它应该工作。