• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to accept json data in codeigniter?

#1
Hello,

 i am getting data from angular2  which is ion json format. its content type  application/json

$fileData = file_get_contents("php://input");

$objFileData = json_decode($fileData);

this way i am accepting data but it does not show any thing in postmat when i try to call that webservice .
Reply

#2
json_decode creates an associate array 'me' => 'you'.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.