I can see that many programs use the following code {code...}. But many servers didn't send the HTTPS header to php-fpm at all? What should I do? We can see that many programs use the following code:
PhpIf (strtoupper ($ _ SERVER ['https']) = 'on '){...}
However, many servers do not send messages at all.HTTPSThis header is for php-fpm? What should I do?
Reply content:
We can see that many programs use the following code:
PhpIf (strtoupper ($ _ SERVER ['https']) = 'on '){...}
However, many servers do not send messages at all.HTTPSThis header is for php-fpm? What should I do?
PhpFunction is_HTTPS () {if (! Isset ($ _ SERVER ['https']) return FALSE; if ($ _ SERVER ['https'] = 1) {// Apache return TRUE ;} elseif ($ _ SERVER ['https'] === 'on') {// IIS return TRUE ;} elseif ($ _ SERVER ['server _ port'] = 443) {// other return TRUE;} return FALSE ;}