xhtml:
< view hidden= "{{currentTabeTables0}}" >
< view wx:for=" {{logs}">
<view>{{logs.pcontent}}</view>
<view>
<!-- <image wx:for="{{logs.ppic}}" wx:for-index="index" wx:for-item="picPath" src="{{picPath.src}}"></image> -->
<image src="{{logs.ppic[item]}}"></image>
</view>
<view>{{logs.pdate}}</view>
< / view >
< / view >
< view > {{logs.pcontent}} < / view > can be displayed. Why can"t image be displayed?
the following is the background php: php
header ("Content-Type:application/json;charset=UTF-8");
$uphonenumber = $_ POST ["phonenumber"]; / / post gets the mobile phone number list value
$json = "";
$data = array();
include("init.php");//
//$sql = "SELECT * FROM yffice_project where uphonenumber = $uphonenumber";
$sql = "SELECT * FROM yffice_project where uphonenumber = $uphonenumber";
mysql_query("set names utf8");
$result = mysql_query($sql);//sql
if($result){
//echo "";
while ($row = mysql_fetch_array($result))
{
$data["uid"]=$row["uid"];
$data["pcontent"]=$row["pcontent"];
$data["ppic"]=explode(",",$row["ppic"]);
$data["pdate"]=$row["pdate"];
$data["pweek"]=$row["pweek"];
$data["pweather"]=$row["pweather"];
}
$json=json_encode($data);
echo $json;
}else{
echo "";
}
mysql_close();//
? >
and the data returned by php: