SID在哪里? [英] Where is SID?

查看:67
本文介绍了SID在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我会承认自己做错了(使用session_register()),所以我要求b $ b试图纠正我的方式,但是......


我的脚本以

<?php

session_start();

?>


在我的页面正文中有如下链接:


< a href =" targetUrl.php?< php print SID ; ?>">目标文字< / a>


问题:SID是一个空字符串。我甚至尝试了

echo" SID:" 。 SID。 ''< br />'';


和SID作为一个空字符串回应。为什么?


---迈克尔

OK, I''ll admit I''ve been doing it wrong (using session_register()), so I''m
trying to correct my ways, but...

My script starts with
<?php
session_start();
?>

In the body of my page a link as follows:

<a href="targetUrl.php?<php print SID; ?>">Target text</a>

Problem: SID is an empty string. I even tried
echo "SID: " . SID . ''<br />'';

and SID echoes as an empty string. Why?

---Michael

推荐答案

Michael Satterwhite写道:
Michael Satterwhite wrote:
好的,我会承认我做错了(使用session_register()),所以我试图纠正我的方法,但......

我的脚本以
<?php
session_start();
?>

在我的页面正文中开始链接如下:

< a href =" targetUrl.php?< php print SID; ?>">目标文字< / a>

问题:SID是一个空字符串。我甚至尝试过回声SID: 。 SID。 ''< br />'';

和SID作为一个空字符串回应。为什么?
OK, I''ll admit I''ve been doing it wrong (using session_register()), so I''m
trying to correct my ways, but...

My script starts with
<?php
session_start();
?>

In the body of my page a link as follows:

<a href="targetUrl.php?<php print SID; ?>">Target text</a>

Problem: SID is an empty string. I even tried
echo "SID: " . SID . ''<br />'';

and SID echoes as an empty string. Why?




几个星期前我问过这个问题 - 你可能可以搜索

线程,虽然没有答案特别有启发性。它显示SID常量仅在某些情况下设置为
。我从来没有确定过b $ b确实能够解决它们的问题。使用session_id()函数获取

会话ID - 这似乎是正确可靠的方法。


-

用于发布的电子邮件地址是垃圾邮件。请通过
http://www.derekfountain.org 与我联系:< a

href =" http://www.derekfountain.org/"> Derek Fountain< / a>



I asked this a few weeks back - you might be able to do a search for the
thread, although none of the answers were especially illuminating. It
appears the SID constant is only set under certain circumstances. I never
did work out what they were. Use the session_id() function to get the
session ID - that appears to be the correct and reliable way to do it.

--
The email address used to post is a spam pit. Contact me at
http://www.derekfountain.org : <a
href="http://www.derekfountain.org/">Derek Fountain</a>


Derek Fountain写道:
Derek Fountain wrote:
Michael Satterwhite写道:

Michael Satterwhite wrote:

好的,我会承认我做错了(使用session_register()) ,所以我试图纠正我的方式,但是......

我的脚本以
<?php
session_start();
< a href =" targetUrl.php?< php print SID; ?>">目标文字< / a>

问题:SID是一个空字符串。我甚至尝试过回声SID: 。 SID。 ''< br />'';

和SID作为一个空字符串回应。为什么?
OK, I''ll admit I''ve been doing it wrong (using session_register()), so I''m
trying to correct my ways, but...

My script starts with
<?php
session_start();
?>

In the body of my page a link as follows:

<a href="targetUrl.php?<php print SID; ?>">Target text</a>

Problem: SID is an empty string. I even tried
echo "SID: " . SID . ''<br />'';

and SID echoes as an empty string. Why?



几个星期前我问过这个问题 - 你可能可以搜索
帖子,虽然没有一个答案特别有启发性。它出现SID常量仅在某些情况下设置。我从来没有弄清楚他们是什么。使用session_id()函数获取
会话ID - 这似乎是正确可靠的方法。


I asked this a few weeks back - you might be able to do a search for the
thread, although none of the answers were especially illuminating. It
appears the SID constant is only set under certain circumstances. I never
did work out what they were. Use the session_id() function to get the
session ID - that appears to be the correct and reliable way to do it.




Would


SID帮助?
SID help?


这篇关于SID在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆