mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
new branch windows
This commit is contained in:
34
session.php
Normal file
34
session.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
error_reporting(-1);
|
||||
session_start();
|
||||
if (!isset($_SESSION['count'])) {
|
||||
$_SESSION['count'] = 1;
|
||||
} else {
|
||||
$_SESSION['count']++;
|
||||
}
|
||||
?>
|
||||
|
||||
<style type="text/css">@import url("style.css");</style>
|
||||
<a href="index.php">Go back to index</a>
|
||||
| <a href="<?php echo $_SERVER["REQUEST_URI"];?>">Refresh</a>
|
||||
|
||||
<title>Session</title>
|
||||
<h1>Session</h1>
|
||||
|
||||
<p>Temp directory: <?php echo sys_get_temp_dir(); ?></p>
|
||||
|
||||
<h2>The code</h2>
|
||||
<pre>
|
||||
session_start();
|
||||
if (!isset($_SESSION['count'])) {
|
||||
$_SESSION['count'] = 1;
|
||||
} else {
|
||||
$_SESSION['count']++;
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2>$_SESSION</h2>
|
||||
Refresh the page to see if counter increases.
|
||||
<pre>
|
||||
<?php print_r($_SESSION); ?>
|
||||
</pre>
|
Reference in New Issue
Block a user