Welcome Guest, Not a member yet? Register   Sign In
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 CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB