为什么我得到ErrorException注意设置变量时未定义的变量?

时间:2017-06-19 10:02:37

标签: php kohana

 class ControllerProduct extends Common {
 public function action_products()
 {

  $sellers_shop_id = '23';
  $this->template->content = View::factory('staff/seller_products')
   ->bind('sellers_shop_id', $sellers_shop_id )
   ->bind('catalogue', $tree )
   ->bind('alert', $this->alert );

视图:

 &nbsp;<a href='/office/product/category_products/<?=$children['name'];?>/<?=$sellers_shop_id;?>' data-toggle='tooltip' title='продукты категории' class='trigg '>

错误: ErrorException [注意]:未定义的变量:sellers_shop_id

var_dump( $this->template->content->sellers_shop_id ); // show var's content

$this->template->sellers_shop_id = $sellers_shop_id;

抛出相同的错误。

0 个答案:

没有答案