请问一个HttpClient的有关问题

WBOY
Release: 2016-06-13 12:01:02
Original
1099 people have browsed it
MyException - 代码迷
首页
  • Web开发
  • Android
  • J2EE
  • PHP
  • Linux/Unix
  • MySql
  • C#
  • 更多...
当前位置: 代码迷 » PHP » 请问一个HttpClient的有关问题

请问一个HttpClient的有关问题

www.MyException.Cn,网友分享于:2014-06-30   浏览:2次
请教一个HttpClient的问题
一个PHP通过HttpClient取回另一个PHP页面listone.php数据,
$cust = HttpClient::quickGet("http://localhost/e/admin/listone.php");
$cust = (array)$cust;


listone.php里
$row=mysql_fetch_assoc($sql))
print_r($row);
$row应该是array类型

取回去后强制转换回array, 好像是数据不对,请帮忙看看怎么转换回原来的array数据
------解决思路----------------------
那怎么对呢?
print_r($row); 输出的只不过是一个文本串
你需要用周知的格式传递数据
------解决思路----------------------
print_r($row); 這句改成 echo json_encode($row);

$cust = (array)$cust; 改成 $cust = json_decode($cust, true);
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template