Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to load a json file
I was wondering if there's some special trick to loading a file e.g. json and returning its contents from a Rest controller. i did try: $json = File::read(APPPATH.'/tmp/response.json', true);
$this->response($json, 200); also tried
$json = File::read(APPPATH.'/tmp/response.json', true);
$this->response(json_decode($json), 200); none of this seemed to work. any ideas? thanks
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share