@@ 9-21 (lines=13) @@ | ||
6 | define('DB_NAME', 'openchat'); |
|
7 | define('URL', URL()); |
|
8 | ||
9 | function URL() |
|
10 | { |
|
11 | $http = "http://"; |
|
12 | $host = $_SERVER['SERVER_NAME']; |
|
13 | $port = $_SERVER['SERVER_PORT']; |
|
14 | $fol = ""; |
|
15 | if(@$_SERVER['SERVER_ADDR']!=NULL) |
|
16 | { |
|
17 | $fol = explode('/', $_SERVER['PHP_SELF'])[1]; |
|
18 | } |
|
19 | $url = $http.$host.":".$port."/".$fol; |
|
20 | return $url; |
|
21 | } |
|
22 | ?> |
|
23 |
@@ 9-21 (lines=13) @@ | ||
6 | define('DB_NAME', 'openchat'); |
|
7 | define('URL', URL()); |
|
8 | ||
9 | function URL() |
|
10 | { |
|
11 | $http = "http://"; |
|
12 | $host = $_SERVER['SERVER_NAME']; |
|
13 | $port = $_SERVER['SERVER_PORT']; |
|
14 | $fol = ""; |
|
15 | if(@$_SERVER['SERVER_ADDR']!=NULL) |
|
16 | { |
|
17 | $fol = "/".explode('/', $_SERVER['PHP_SELF'])[1]; |
|
18 | } |
|
19 | $url = $http.$host.":".$port.$fol; |
|
20 | return $url; |
|
21 | } |
|
22 | ?> |
|
23 |