header(‘Content-type: appliction/json; charset=shift-JIS‘); // error //{ // "result": false, // "message": "longin", // "nextUrl": "http://xxxxx/login/" // } $data =array(); class Test { public $id ; public $name ; } for ($x=1; $x<=50; $x++) { $test =new Test(); $test->id = urlencode("test".strval($x)); $test->name= urlencode("testname"); $data[] =$test; } echo "{".‘"result": true, "entrylist"‘.":".urldecode(json_encode($data))."}";
时间: 2024-10-06 18:29:37