session php保存信息到当前Session
php保存信息到当前Session [代码片段(16行)] 上面的代码输出结果如下:
<?php session_start(); print("<html><b>"); $_SESSION["sitename"] = "W3M"; print("A value saved in the session named as sitename.\n"); $_SESSION["MyChoice"] = "red"; print("A value saved in the session named as MyChoice.\n"); echo $_SESSION['sitename']."\n"; echo $_SESSION['MyChoice]."\n"; print("</b></html>\n"); ?>
上面的代码输出结果如下:
A value saved in the session named as MyLogin. A value saved in the session named as MyColor. W3M red
- 上一篇:php数据库备份脚本
- 下一篇:发送邮件 php提交表单发送邮件的范例
精彩图集
精彩文章