I have the following function, which returns the values contained in the file conf.json, which I verified that it exists, that has values inside, and that the route is correct.
public function getJson(){
$get = file_get_contents('conf.json');
return json_decode($get, true);
}
But using it this way does not return anything:
$ s = getJson (); echo $ s ['domain'];
There is no error, but it does not return anything either, and I verified that it has the correct values, this is the json file:
{ 'domain': 'domain', 'user': 'user' }
I already verified that everything was in the right place and that it was well defined, but still does not take anything out when calling the function, and when calling "domain"