是否可以在我的本地计算机上运行 .php 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9318858/
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
Is it possible to run .php files on my local computer?
提问by Steven Rogers
Possible Duplicate:
PHP server on local machine?
可能的重复:
本地机器上的 PHP 服务器?
Is it possible to run .php files on my local computer? I know if i open up a web browser and enter the file location into the URL for HTML files, the html file will run and display. Is there a way to do the same with .php files?
是否可以在我的本地计算机上运行 .php 文件?我知道如果我打开 Web 浏览器并将文件位置输入到 HTML 文件的 URL 中,该 html 文件将运行并显示。有没有办法对 .php 文件做同样的事情?
回答by AlienWebguy
Sure you just need to setup a local web server. Check out XAMPP: http://www.apachefriends.org/en/xampp.html
当然,您只需要设置本地 Web 服务器。查看 XAMPP:http: //www.apachefriends.org/en/xampp.html
That will get you up and running in about 10 minutes.
这将使您在大约 10 分钟内启动并运行。
There is now a way to run php locally without installing a server: https://stackoverflow.com/a/21872484/672229
现在有一种无需安装服务器即可在本地运行 php 的方法:https: //stackoverflow.com/a/21872484/672229