Google Chrome无法连接到本地主机 [英] Google Chrome can't connect to localhost

查看:205
本文介绍了Google Chrome无法连接到本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在NetBeans中按照我的第一个php项目的教程。我选择新的PHP应用程序名称,然后在index.php的php部分中输入 echo(anything),当我运行它时,我总是得到错误哎呀!谷歌浏览器无法连接到本地主机。我不明白为什么,因为我也有一个Java Web应用程序(从NetBeans选择),当我把东西放在HTML中,我可以让事情运行得很好。如何解决这个问题?

解决方案

确保PHP在您的机器上运行(XAMP或WAMP),并且它应该是 echoanything;


I'm trying to follow a tutorial for my first php project in netbeans. I select new php application name it and then simply type echo("anything") in the php portion of index.php and when I run it I always get the error Oops! Google Chrome could not connect to localhost. I don't understand why because I also have a Java web application(selection from netbeans) and when I put stuff in the html I can get things to run just fine. How can I get rid of this issue?

解决方案

Make sure that PHP is running on your machine (XAMP or WAMP) and it should be echo "anything";

这篇关于Google Chrome无法连接到本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆