$result是一个对象来的,输出有错: Catchable fatal error: Object of class Result could not be converted to string in D:\WWW\wsd\trunk\src\server\api\getClients.php on line 44
Object of class Result could not be converted to string 对象不能被转换为字符串 既如此,当然也不能 json 了 看看你的 Client 类定义
能看到什么?
Catchable fatal error: Object of class Result could not be converted to string in D:\WWW\wsd\trunk\src\server\api\getClients.php on line 44
既如此,当然也不能 json 了
看看你的 Client 类定义
function connect_host() {
$host = "127.0.0.1";
$name_db = "root";
$password_db ="root";
$name_tb = "wsd_db";
$con = mysql_connect($host, $name_db, $password_db);
if(!$con) {
echo "connect host failed". mysql_error();
return;
}
mysql_select_db($name_tb, $con);
mysql_query("SET NAMES UTF8");#设置utf-8编码
return $con;
}