1 | <?php |
||
2 | /** |
||
3 | Copyright (C) 2018-2020 KANOUN Salim |
||
4 | This program is free software; you can redistribute it and/or modify |
||
5 | it under the terms of the Affero GNU General Public v.3 License as published by |
||
6 | the Free Software Foundation; |
||
7 | This program is distributed in the hope that it will be useful, |
||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
10 | Affero GNU General Public Public for more details. |
||
11 | You should have received a copy of the Affero GNU General Public Public along |
||
12 | with this program; if not, write to the Free Software Foundation, Inc., |
||
13 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||
14 | */ |
||
15 | |||
16 | /** |
||
17 | * Terminates user's session |
||
18 | */ |
||
19 | |||
20 | session_start(); |
||
21 | session_unset(); |
||
22 | session_destroy(); |
||
23 | header('location: ../index.php'); |
||
24 | exit; |
||
25 | ?> |
||
0 ignored issues
–
show
|
|||
26 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.