Advertisement
Guest User

Untitled

a guest
Dec 15th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. 10
  2. 11 // check if the current port is not 80 or 443
  3. 12 if (isset($_SERVER['SERVER_PORT'])) {
  4. 13 if (($_SERVER['SERVER_PORT'] != 80) && ($_SERVER['SERVER_PORT'] != 443)) {
  5. 14 if (( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' )) {
  6. 15 $prefs['https_port'] = (int) $_SERVER['SERVER_PORT'];
  7. 16 } else {
  8. 17 $prefs['http_port'] = (int) $_SERVER['SERVER_PORT'];
  9. 18 }
  10. 19 }
  11. 20 }
  12. 21
  13. 22 if ( $prefs['https_port'] == 443 ) {
  14. 23 $prefs['https_port'] = '';
  15. 24 } else {
  16. 25 $prefs['http_port'] = '';
  17. 26 }
  18. 27
  19. 28
  20. 29 // if ( $prefs['http_port'] == 80 )
  21. 30 // $prefs['http_port'] = '';
  22. 31
  23. 32 // Detect if we are in HTTPS / SSL mode.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement