本文介绍了我该如何摆脱127.0.0.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 你好, Dreamweaver和php 我正在开发一个网站,我在网站上启用了用户截屏 软件。 图像不存储在我的服务器/网站上,而是用户将 链接添加到数据库。链接的格式为 www.someplaceonthenet.com/images/ somepicture.gif 等我指示 用户在添加链接时遗漏http:// 然后我尝试显示这张照片在页面上使用Dreamweaver和 选择insert / image /然后选择数据源并导航到 保存图像位置的字段。 这似乎有效,当我查看页面时我可以看到 图像的轮廓但没有图像,查看属性显示该页面是 试图展示 http://127.0.0.1/www.someplaceonthen...omepicture.gif 这是错误的...... 任何人对如何摆脱127.0.0.1都有任何想法? 谢谢, td。Hello,Dreamweaver and phpI am developing a site and on the site I enable users to put screenshotsof software.The images are not stored on my server/site but rather the user adds thelink to a database. The format of the link is www.someplaceonthenet.com/images/somepicture.gif etc I instruct theuser to leave out http:// when adding the linkI then attempt to show this pic on a page by using dreamweaver andchoosing insert /image / and then choosing datasources and navigating tothe field that holds the location of the image.This seems to work, when I view the page I can see an outline of theimage but no image, looking at the properties shows that the page istrying to display http://127.0.0.1/www.someplaceonthen...omepicture.gifwhich is wrong...Anyone have any ideas on how to get rid of the 127.0.0.1?Thanks,td.推荐答案 就是这样非常漂亮,因为每个人都可以使用imageshack.us 但是如果你在Windows上开发这个,那么你最好的运气,因此 Dreamweaver,你可以使用HOSTS文件位于 < System_Root> \ System32 \中,然后您修改以将您想要解析的任何域名添加到您的IP地址,例如localhost! 既然你不能轻易创建域名来解析你的 主机,我相信这是你问题的解决方案,因为windows 将在使用其dns软件解析域之前查看您的HOSTS文件。 同样,127.0.0.1不能被替换,但您可以使用其他集合 规则与HOSTS文件一样,127.0.0.1自动解析为你的 系统主机,不能在其他任何地方解决!!That sounds pretty rediculous, since everyone can already use imageshack.usBut your best luck if your developing this on Windows, hence theDreamweaver, You can use the HOSTS file located in<System_Root>\System32\ which then you modify to add whatever domain youwish to resolve to your IP address such as localhost!Since you cant just create domains out of the blue to resolve to yourhost, I believe this is your solution to your problem, since windowswill look to your HOSTS file before resolving domains with its dns software.As well, 127.0.0.1 cant just be replaced, but you can use other sets ofrules with the HOSTS file as 127.0.0.1 is automatically resolved to yoursystems host and cant be resolved anywhere else!! 在主机名前面放回http:// Gordon L. BurdittPut back the http:// before the host name.Gordon L. Burditt 罚款,但当你把链接放在网上时页面,*返回http:// * Fine, but when you put the link on the web page, *PUT BACK THE http:// * www.someplaceonthenet.com/images/somepicture.gif 是*相对路径* 您网站上的某个地方,相当于上面的127.0.0.1 。这就是它应该被解释的方式。它是。 www.someplaceonthenet.com/images/somepicture.gif is a *RELATIVE PATH* to someplace on your site, equivalent to the above with the 127.0.0.1 in it. That''s how it''s supposed to be interpreted. And it is. 在主机名前面放回http://。 Gordon L. Burditt Put back the http:// before the host name. Gordon L. Burditt 谢谢Gordon。尝试了但是*然后*它变成了 http:/127.0.0.1/www.someplaceonthenet.com/images/somepicture.gif和 他们(照片)仍然做不显示。 td。Thanks Gordon. Tried that but *then* it becomeshttp:/127.0.0.1/www.someplaceonthenet.com/images/somepicture.gif andthey (the pics) still do not show.td. 这篇关于我该如何摆脱127.0.0.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-26 03:54