equal
deleted
inserted
replaced
219 * @return string |
219 * @return string |
220 */ |
220 */ |
221 |
221 |
222 function get_server_url() |
222 function get_server_url() |
223 { |
223 { |
224 return 'http' . ( $GLOBALS['is_https'] ) . '://' . $_SERVER['HTTP_HOST']; |
224 $server_name = false; |
|
225 if ( isset($_SERVER['HTTP_HOST']) ) |
|
226 $server_name = $_SERVER['HTTP_HOST']; |
|
227 else if ( isset($_SERVER['SERVER_NAME']) ) |
|
228 $server_name = $_SERVER['SERVER_NAME']; |
|
229 else |
|
230 $server_name = 'localhost'; |
|
231 |
|
232 return 'http' . ( $GLOBALS['is_https'] ) . '://' . $server_name; |
225 } |
233 } |
226 |
234 |
227 /** |
235 /** |
228 * Returns the full page ID string of the main page. |
236 * Returns the full page ID string of the main page. |
229 * @return string |
237 * @return string |