assign('title',$title); $Us"/> assign('title',$title); $Us">

Home >Backend Development >PHP Tutorial > thinkphp的有关问题弄了半天了,还是不知道,各位大神帮忙看看吧

thinkphp的有关问题弄了半天了,还是不知道,各位大神帮忙看看吧

WBOY
WBOYOriginal
2016-06-13 12:37:29935browse

thinkphp的问题弄了半天了,还是不知道,各位大神帮忙看看吧
控制器中的代码:
public function testt(){
//$title="练习册";
//$content='
'.$_GET['name'];
//$this->assign('title',$title);
$User = M('name');
$list = $User->select();
$this->assign('list',$list);
$this->assign("title","SMARTY测试");
$this->display();
}
模板中的代码:
{$title}




{$vo.age}{$vo.name}


重要去掉foreach部分就正常,否则就会出显这样
syntax error, unexpected ')', expecting T_VARIABLE or '$' D:\AppServ\www\App\admin\Runtime\Cache\6e178638460c8ba2282739c247c2ce14.php 第 10 行.

cache文件中的代码为:





$): echo ($vo["age"]); echo ($vo["name"]); ?>


看来好久也没有头绪,怎么办啊?
thinkphp foreach
Statement:
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