Home  >  Article  >  Backend Development  >  这个有关问题属于跨域有关问题吗?该怎么解决

这个有关问题属于跨域有关问题吗?该怎么解决

WBOY
WBOYOriginal
2016-06-13 12:05:19880browse

这个问题属于跨域问题吗?该如何解决?
例如有一php网站IP地址是    222.1.2.3 域名是 www.abc.com 在网站根目录下有一二级目录 dir2

现在需要用IP访问这个网站,登录后保存session变量. 然后通过一个域名访问二级目录
www.abc.com/dir2  下面某页面,要求如果在IP访问下登录了,在域名访问下也是登录状态。
这个问题属于跨域问题吗?该如何解决?
------解决方案--------------------
这个我觉得不算。。不知其他的小伙伴会是啥想法。
------解决方案--------------------
 你自己做一下不就知道了?
------解决方案--------------------
为什么不统一,换来换去的。
------解决方案--------------------
IP 與 域名是屬於跨域的
localhost 與 127.0.0.1 就是跨域了。
需求有點怪,域名和IP为何要分开用?
------解决方案--------------------
同一台机器就不算跨域。
------解决方案--------------------
这种情况可以考虑用COOIKES。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn