EllisLab text mark
Advanced Search
     
How to load json file in codeigniter… newbie
Posted: 15 November 2012 11:26 PM   [ Ignore ]
Joined: 2012-07-27
6 posts

Hi, everyone…
I want to ask something about how to load json file in codeigniter
But before load the json file, i want to pass some data to json file
Any idea for this??

Thanks before

Here is some code to load json file in jquery event calendar

$("#calendar").eventCalendar({
  eventsjson
'file.json' //here to load json file
}); 
 
Posted: 18 November 2012 02:33 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

See the PHP manual on json decode and json encode.

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 18 November 2012 07:46 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-07-27
6 posts

I have see the manual about the json decoden and json encode.
But i have the problem with json data.
There is 2 ways to pass the json data :
1. It write to some file
2. It write to javascript

But write to javascript there is some limit length for the javascript.
So i have to write to json file.

Thanks before

 
Posted: 18 November 2012 09:17 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts

Read and Write Json Files

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View