私のページでこのコードを使用すると問題が発生します:
期限切れセッションのあるコード
<?php
session_start();
if(!isset($_SESSION['clientmacs']) ) {
header('Location: index.php');
} else {
if(time() - $_SESSION['timeLogin'] > 1800) {
header('Location: include/logout.php');
}
$userclient = $_SESSION['clientmacs'];
?>
<html>
HTML CODE
</html>
<?php
}
?>
しかし、このコードを使用すると、問題はなくなり、ページは正常に機能します。
期限切れセッションのないコード
<?php
session_start();
if(!isset($_SESSION['clientmacs'])) {
header('Location: index.php');
} else {
$userclient = $_SESSION['client'];;
?>
<html>
HTML CODE
</html>
<?php
}
?>
Google Chromeのエラー:
This webpage has a redirect loop
Http://localhost/mac/index.php The website has too many redirects. The incidence may be
resolved by deleting the cookies from this site or allowing third party cookies. If
that fails, the incidence may be related to a bug in the server configuration, not the
computer.