session_a.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>session</title>
<meta name="Generator" content="">
<meta name="Author" content="czh">
<meta name="Keywords" content="php date">
<meta name="Description" content="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php 
session_start();
$_SESSION['title']='Session Example';
$_SESSION['chapter']='2';
$_SESSION['name']='session_b.php';
?>
<a href='./session_b.php'>Connect to the next file using a session instance</a>
</body>
</html>

session_b.php

<?php 
session_start();
echo '<br>title:'.$_SESSION['title'];
echo '<br>chapter:'.$_SESSION['chapter'];
echo '<br>name:'.$_SESSION['name'];
echo session_id();
?>

初学php:session

初学php:session

相关文章:

  • 2021-07-02
  • 2021-06-16
  • 2021-04-30
  • 2021-07-15
  • 2021-11-07
  • 2021-05-21
  • 2021-08-28
  • 2021-12-03
猜你喜欢
  • 2021-07-31
  • 2022-01-11
  • 2021-12-05
  • 2021-12-05
  • 2021-12-06
  • 2021-11-29
  • 2021-12-23
相关资源
相似解决方案