maildemon Posted June 30, 2014 Report Share Posted June 30, 2014 (edited) Sveiki, būšu priecīgs, ja kāds pakonsultēs. Runa vairāk ir par objektiem, kuru vērtībām neprotu tikt klāt. Esmu izvēlējies http://flightphp.com/learn vienkāršu framework REST API <?php require 'flight/Flight.php'; Flight::route('GET|POST /', function(){ $request = Flight::request(); $json = Flight::request()->json; var_dump($json); }); Flight::start(); ?> curl -i -H "Accept: application/json" -X POST -d "var=TESTasdasdasdasd" http://mana_adrese/ Atbilde HTTP/1.1 200 OK: object(flight\util\Collection)#13 (1) { ["data":"flight\util\Collection":private]=> array(0) { } } Nevaru saprast, kā pareizi to framework jālieto, jeb kā es varu tikt pie Json datiem? Edited June 30, 2014 by maildemon Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 30, 2014 Report Share Posted June 30, 2014 Nu apskaties taču to flight\util\Collection klasi... Quote Link to comment Share on other sites More sharing options...
gatisl Posted July 1, 2014 Report Share Posted July 1, 2014 (edited) Kādu palīdzību tu ceri sagaidīt no šī topika? Json formāta atbildes atgriešana ir aprakstīta tajā pašā dokumenācijā ko ielinkoji http://flightphp.com/learn#json Edited July 1, 2014 by gatisl Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.