Last active
June 30, 2020 14:18
-
-
Save rwaddin/5e40b34b102d0ec6f0535069a820be44 to your computer and use it in GitHub Desktop.
setting web with json just 1 index, you can modify :)
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
<?php | |
if (! function_exists('setting')) | |
{ | |
function setting($index = false) | |
{ | |
if (file_exists("./setting.json") AND $index) { | |
$json = file_get_contents('./setting.json'); | |
$data = json_decode($json,true); | |
return (isset($data[$index])) ? $data[$index] : false; | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment