Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 使用;http://localhost" 而不是",;http://xx.xx.xx.xx" WAMP上的iPod_Iphone_Localhost_Wampserver - Fatal编程技术网

Iphone 使用;http://localhost" 而不是",;http://xx.xx.xx.xx" WAMP上的iPod

Iphone 使用;http://localhost" 而不是",;http://xx.xx.xx.xx" WAMP上的iPod,iphone,localhost,wampserver,Iphone,Localhost,Wampserver,我正在运行Windows 7,并使用iPod Touch访问本地主机站点,以便在WAMP上进行测试 我可以通过在iPod上的Safari中导航到我的机器IP来浏览本地主机站点,就像这样:http://10.0.0.100 我想知道是否可以使用http://localhost,以及我如何做到这一点 非常感谢 基本上,localhost指的是127.0.0.1指的是环回ip,它是ipod本身,因此除非您在ipod用于解析连接设置中域名的(DNS/hosts文件)中更改[localhost to re

我正在运行Windows 7,并使用iPod Touch访问本地主机站点,以便在WAMP上进行测试

我可以通过在iPod上的Safari中导航到我的机器IP来浏览本地主机站点,就像这样:
http://10.0.0.100

我想知道是否可以使用
http://localhost
,以及我如何做到这一点


非常感谢

基本上,localhost指的是127.0.0.1指的是环回ip,它是ipod本身,因此除非您在ipod用于解析连接设置中域名的(DNS/hosts文件)中更改[localhost to resolve to machine ip,在本例中为10.0.0.100],否则这是不可能的,我不建议您这样做

以下是更改ipod中主机文件所需的步骤(我已经警告过你,除非你知道自己在做什么,否则这不是一件好事)

资料来源:

简单解决方案:

主机文件位于:/etc/hosts

要编辑此文件,您需要SSH到您的设备中,如果您知道如何直接执行此操作,只需使用vi或nano来编辑该文件。从windows使用WinSCP通过FTP(SSH)访问文件系统。然后只需导航到/etc/hosts,将文件下载到桌面上,右键单击并用记事本打开,将解析器添加到最后一行“192.168.0.100 testserver”,保存,并用新文件替换原始文件

/etc/host——示例配置

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1              localhost

255.255.255.255   broadcasthost

::1                        localhost

192.168.0.100       testserver

*要将SSH安装到ipod中,它必须安装OpenSSH,通常这需要越狱。

谢谢,非常有用!!