且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在wampp服务器中使用本地计算机ip地址执行PHP站点

更新时间:2021-07-08 23:07:46

当你使用wampp服务器时要么使用localhost,要么使用127.0.0.1从wampp的www文件夹中执行任何操作。如果你在谈论你的局域网/ wlan的IP地址那么那就不行了。因为wampp是一个在你的电脑内运行的服务器。所以你的电脑的主机地址现在是127.0.0.1。如果您要从共享电脑上看到您的网站,那么您可能需要其他IP地址。
While you are using wampp server either you use localhost or you use 127.0.0.1 to execute anything from the www folder of wampp. If you are talking about the ip address which is for your lan/wlan then that's not gonna work. Because wampp is a server which is running inside your pc. So the host address of your pc is 127.0.0.1 now. If you gonna see your website from a shared pc, then you might need other ip address.