Hello! Faced a strange problem. I load YML configs, fetch a file through parsing file_get_contents directly from the index - everything works great. But from under my context class it does not work. It got to insanity - commented out all the functionality, left the constructor empty and made a separate public function with getting the file and tried to output its contents through echo to the page. Does not work. With what it can be connected? thank
Closed due to the fact that off-topic participants Dmitriy Simushev , Anton Shchyrov , HamSter , αλεχολυτ , aleksandr barakin 11 Nov '16 at 10:31 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Dmitriy Simushev, Anton Shchyrov, HamSter, αλεχολυτ, aleksandr barakin
- oneSo that you did not bother to receive error messages. - Ipatiev
|
1 answer
file_get_content works fine. You just haven't learned OOP yet. Read about the area of ​​visibility http://php.net/manual/ru/language.oop5.visibility.php Maybe there’s still a mistake somewhere - I advise you to put the code listing here or on pastebin.com
|