当您安装 Apache 或 IIS 或任何其他 Web 服务器应用程序时,您的计算机将充当 Web 服务器。网络服务器不仅限于本地环境,它也可以响应从互联网收到的请求。
例如,如果您的计算机中安装了 Apache 或 IIS 并且已连接到互联网。然后记下您的 IP 地址并从外部切换到任何其他计算机,并尝试访问您的计算机,瞧,它会从您的 Web 服务器定义的 Web 根目录中访问您的文件。您的 PC 现在充当客户端的 Web 服务器。局域网也是如此。
举例来说,有 5 台 PC 连接到 WIFI 路由器。 wifi 会将本地 IP 地址分配给所有计算机,因此
PC 1 的 IP 地址为 192.168.1.2
PC 2 的 IP 地址为 192.168.1.3
PC 3 的 IP 地址为 192.168.1.4
PC 4 的 IP 地址为 192.168.1.5
PC 5 的 IP 地址为 192.168.1.6
现在以您已安装 Apache 或 IIS 为例在 PC 1 中,其 IP 地址为192.168.1.2,现在连接到网络的所有其他计算机将能够从地址 192.168.1.2 访问您的 Web 目录。通过网络浏览器。无论您使用什么 PHP 应用程序,这都会起作用。负责路由传入请求的是您的 Web 服务器,而不是您的 PHP 应用程序:)
希望这会有所帮助。
When you install Apache or IIS or any other web server application, your computer acts as a web server. a webserver is not limited to local environment but it can respond to the request recieved from the internet too.
for example if you have installed Apache or IIS in your computer and you are connected to internet. then note down your IP address and switch to any other computer from outside and try accessing your computer and voila it accesses your files from within the web root directory as defined by your web server. your PC is now acting as a web server for the client. the same goes with LAN.
take for example there are 5 PC's connected to a WIFI router. the wifi will assign the local IP address to all the computer and hence
PC 1 have IP Address 192.168.1.2
PC 2 have IP Address 192.168.1.3
PC 3 have IP Address 192.168.1.4
PC 4 have IP Address 192.168.1.5
PC 5 have IP Address 192.168.1.6
now take for example you have installed Apache or IIS in PC 1 which have an IP address of 192.168.1.2, now all the other computer connected to netowrk will be able to access your web directory from the address 192.168.1.2. via a web browser. this will work regardless of what PHP application you are using. it is your Web server which is responsible for routing incoming request not your PHP application :)
是的。网络上的用户将像从本地计算机访问该站点一样,只不过他们会将 localhost 替换为该计算机的 IP 地址。
Should i use EasyPHP to install the application on my client's LAN server?
Yes. And those on the network would access the site just like you do from the local machine, except that they'll replace localhost with that machine's IP address.
Install the webserver and webapplication normally, other computers in your lan may access your webserver by simply accessing your network address (IP) normally something like 192.168.?.?
是的,您可以通过在连接到 LAN 的任何 PC 上安装 Web 服务器来在 LAN 网络上部署 Web 应用程序,之后您必须更改 Web 服务器中的某些配置以允许从任何地方访问它,甚至从外部抛出 Internet,您可以做一些技巧,比如给它虚拟主机名作为它的正常网络应用程序,很抱歉我的英语非常糟糕。
yes you can deploy web application on LAN network by installing your web server in any PC connected to your lan after that you have to change some configuration in your web server to allow accessing it from any where even from outside throw the internet , and you can do some tricks like give it virtual host name as its normal web application , am sorry my English language is very bad .
发布评论
评论(5)
当您安装 Apache 或 IIS 或任何其他 Web 服务器应用程序时,您的计算机将充当 Web 服务器。网络服务器不仅限于本地环境,它也可以响应从互联网收到的请求。
例如,如果您的计算机中安装了 Apache 或 IIS 并且已连接到互联网。然后记下您的 IP 地址并从外部切换到任何其他计算机,并尝试访问您的计算机,瞧,它会从您的 Web 服务器定义的 Web 根目录中访问您的文件。您的 PC 现在充当客户端的 Web 服务器。局域网也是如此。
举例来说,有 5 台 PC 连接到 WIFI 路由器。 wifi 会将本地 IP 地址分配给所有计算机,因此
现在以您已安装 Apache 或 IIS 为例在 PC 1 中,其 IP 地址为192.168.1.2,现在连接到网络的所有其他计算机将能够从地址 192.168.1.2 访问您的 Web 目录。通过网络浏览器。无论您使用什么 PHP 应用程序,这都会起作用。负责路由传入请求的是您的 Web 服务器,而不是您的 PHP 应用程序:)
希望这会有所帮助。
When you install Apache or IIS or any other web server application, your computer acts as a web server. a webserver is not limited to local environment but it can respond to the request recieved from the internet too.
for example if you have installed Apache or IIS in your computer and you are connected to internet. then note down your IP address and switch to any other computer from outside and try accessing your computer and voila it accesses your files from within the web root directory as defined by your web server. your PC is now acting as a web server for the client. the same goes with LAN.
take for example there are 5 PC's connected to a WIFI router. the wifi will assign the local IP address to all the computer and hence
now take for example you have installed Apache or IIS in PC 1 which have an IP address of 192.168.1.2, now all the other computer connected to netowrk will be able to access your web directory from the address 192.168.1.2. via a web browser. this will work regardless of what PHP application you are using. it is your Web server which is responsible for routing incoming request not your PHP application :)
hope this helps.
是的。网络上的用户将像从本地计算机访问该站点一样,只不过他们会将
localhost
替换为该计算机的 IP 地址。Yes. And those on the network would access the site just like you do from the local machine, except that they'll replace
localhost
with that machine's IP address.您只需安装
EasyPHP
并将您的应用程序放在正确的目录中。或者对于 Windows 计算机 WAMP 或 XAMPP 可以是简单的解决方案。
对于 Linux,您可以手动安装所有内容或使用 XAMPP。
这些配置都很简单直接。
You just need to install
EasyPHP
and put your application in correct directory.Alternatively for windows machine WAMP or XAMPP can be easy solution.
And for linux you can manually install everything or use
XAMPP
.These are just easy and straightforward to configure.
正常安装网络服务器和网络应用程序,您局域网中的其他计算机只需访问您的网络地址(IP)即可访问您的网络服务器,通常类似于
192.168.?.?
Install the webserver and webapplication normally, other computers in your lan may access your webserver by simply accessing your network address (IP) normally something like
192.168.?.?
是的,您可以通过在连接到 LAN 的任何 PC 上安装 Web 服务器来在 LAN 网络上部署 Web 应用程序,之后您必须更改 Web 服务器中的某些配置以允许从任何地方访问它,甚至从外部抛出 Internet,您可以做一些技巧,比如给它虚拟主机名作为它的正常网络应用程序,很抱歉我的英语非常糟糕。
yes you can deploy web application on LAN network by installing your web server in any PC connected to your lan after that you have to change some configuration in your web server to allow accessing it from any where even from outside throw the internet , and you can do some tricks like give it virtual host name as its normal web application , am sorry my English language is very bad .