-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsg.php
More file actions
76 lines (57 loc) · 1.68 KB
/
Copy pathsg.php
File metadata and controls
76 lines (57 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
// session_start();
// $cookie_name = "testscript";
// $cookie_value = $_SERVER['REQUEST_URI'];
// setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
// // print_r("_SERVER");
// // print_r($_SERVER);
// // print_r("_GET");
// // print_r($_GET);
// // print_r("_POST");
// // print_r($_POST);
// // print_r("_FILES");
// // print_r($_FILES);
// // print_r("_COOKIE");
// // print_r($_COOKIE);
// $status = session_status();
// if ($status === PHP_SESSION_DISABLED) {
// echo "Session Status: Sessions are disabled<br>";
// } elseif ($status === PHP_SESSION_NONE) {
// echo "Session Status: No session active<br>";
// } elseif ($status === PHP_SESSION_ACTIVE) {
// echo "Session Status: Session is active<br>";
// }
// print ("_SESSION <br>");
// print_r($_SESSION);
// if (isset($_GET["clear"])) {
// session_unset();
// print ("Session Unset");
// }
// if (isset($_SESSION["a"])) {
// print ("Variable already exists..... Value: {$_SESSION['a']}");
// } else {
// $_SESSION ['a'] = time();
// print ("Assigning new variable..... value: {$_SESSION['a']}");
// }
// if (isset($_GET["destroy"])) {
// session_destroy();
// print ("Session Destroyed");
// }
include 'libs/load.php';
print ("_SESSION <br>");
print_r($_SESSION);
if (isset($_GET["clear"])) {
Session::unset();
print ("Session Unset\n\n");
}
if (Session::isset("a")) {
print ("Variable already exists..... Value: " . Session::get('a') . "\n\n");
} else {
Session::set("a", time());
print ("Assigning new variable..... value: " . Session::get('a') . "\n\n");
}
if (isset($_GET["destroy"])) {
Session::destroy();
print ("Session Destroyed\n\n");
}
?>