I am now writing Android apps and the apps will use json(utf8):
http://.....xxx.php?json=%7B%22name%22%3A%22peterchan%22%2C%22phone%22%3A%2212345678%22%2C%22password%22%3A%226kxhSJM6iLB0kZ9LZGCEUQ%3S%3D%0A%22%7D
the xxx.php
is like:
<?php
header("Content-Type:text/html; charset=utf-8");
ini_set('default_charset', 'utf-8');
$json = $_GET["json"];
$obj = json_decode($json);
$name = $obj -> {"name"};
$phone = $obj -> {"phone"};
$password = $obj -> {"password"};
printf($json);
?>
but it returns:
Warning: printf()
: Too few arguments in xxx.php
Can anyone help me? Please