Conditions | 5 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | protected function is_HTTPS() |
||
29 | { |
||
30 | if (!isset($_SERVER['HTTPS'])) { |
||
31 | return false; |
||
32 | } |
||
33 | if ($_SERVER['HTTPS'] === 1) { //Apache |
||
34 | return true; |
||
35 | } elseif ($_SERVER['HTTPS'] === 'on') { //IIS |
||
36 | return true; |
||
37 | } elseif ($_SERVER['SERVER_PORT'] == 443) { //其他 |
||
38 | return true; |
||
39 | } |
||
40 | return false; |
||
41 | } |
||
46 |