我在mysite root中有几个脚本,他们可以自由地互相呼叫,或者点击一个链接:
<a href="http://main.com/login.php">login</a>
或标题位置调用:
header("Location: http://main.com/index.php");
login.php和index.php在顶部调用sesssion_start(),这样我就可以在脚本中维护常见的会话变量。
现在我在index.php中有jQuery需要使用ajax调用站点root,util.php中的另一个脚本:
` galleryStatus2$.load('util.php', {
id : g.user_id,
op : "register_keys",
test_sk : test_sk,
test_pk : test_pk,
live_sk : live_sk,
live_pk : live_pk
}, `
如果我将一个session_start()放在util.php的顶部,它会挂起,所以很明显我在这里做错了。
有人可以对这种情况有所了解并解释为什么我不能将session_start放在util.php的顶部吗?
感谢。