dongping5230 2017-06-19 10:02
浏览 43

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

 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 );

view:

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

err: ErrorException [ Notice ]: Undefined variable: sellers_shop_id

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

and

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

throw the same error.

  • 写回答

0条回答 默认 最新

    报告相同问题?