セッションIDを取得する

<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>現在のセッションIDを取得する</title>
</head>
<body>
<?php
echo '<p>現在のセッションIDは「' . session_id() . '」です。</p>';
?>
</body>
</html>