基于thinkphp3.1开发的一套系统,采用MVC模式
有一段代码如下是在TPL中的html文件,
{"data":{"total":<?php echo $count; ?>,"page":<?php echo $pagecount; ?>,"songs":[<?php $i=1;foreach($usersongs as $val){ ?>{"id":<?php echo $val['id']; ?>,"createTime":"<?php echo date('Y/m/d',$val['createTime']); ?>","singer":"<?php echo $val['singer']; ?>","songName":"<?php echo $val['songName']; ?>"}<?php if($i!=count($usersongs)){echo ',';}$i++;} ?>],"cur":<?php echo $_GET['p']; ?>},"code":0,"info":""}
{} 这个是json代码 不是PHP的 PHP只是输出字符串
好的,谢谢,我去找找这方面的资料