以下我不说的地方表示正常.
A模板:{$orderabc}
A的AAction.class.php文件:
public function index()
{
$this->orderabc = 'thinkphp';
$this->display();
}可以显示:"thinkphp",现修改如下: public function index()
{
import('@.Action.B');
$c=new BAction();
$this->orderabc=$c->_listst();
$this->display();
}B的BAction.class.php文件: function _listst() {
$orderabc='asdfasd';
return $orderabc;
}A模板浏览正常显示:"asdfasd".现在B的BAction.class.php文件修改如下:也就是之前thinkphp的版本中的写法:
function _listst() {
$orderabc='asdfasd';
$this->assign ( 'orderabc', $orderabc );
return;
}或 function _listst() {
$orderabc='asdfasd';
$this->orderabc= $orderabc;
return;
}都就不显示了,这是为什么?最佳答案