【发布时间】:2016-03-21 19:37:53
【问题描述】:
在我的constants.php 文件中,我设置了站点根目录。
define("SITEROOT","http://www.example.com/");
请查看 http:// 和 http://www 的区别。在下面的描述中。
现在 session_start 仅在我从 http://www.example.com/index.php 移动到任何其他页面时才有效。但是,如果我使用 http://example.com 并尝试使用 http://www.example.com/pagename.php 在其他页面上回显会话详细信息,则会话不会继续。
如果用户使用 http://example.com,有什么方法可以自动将 浏览器地址栏中的 url 更正为 http://www.example.com 吗?
【问题讨论】:
-
查看link