Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored domain field into separate config.ini file
- Loading branch information
1 parent
d5401cf
commit 1987610
Showing
5 changed files
with
47 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
; Setting the domain of this instance | |||
[general] | |||
domain=http://serena.macs.hw.ac.uk/serena/discover-me-semantically/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
<?php | |||
|
|||
function getDomain($file){ | |||
$domain = ""; | |||
|
|||
if (file_exists($file) && is_readable($file)) | |||
{ | |||
$settings=parse_ini_file($file); | |||
$domain=$settings["domain"]; | |||
|
|||
} | |||
else | |||
{ | |||
// If the configuration file does not exist or is not readable, DIE php DIE! | |||
die("Sorry, the $file file doesnt seem to exist or is not readable!"); | |||
} | |||
return $domain; | |||
} | |||
|
|||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters