Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 设置变量时,为什么会收到ErrorException通知未定义变量?_Php_Kohana - Fatal编程技术网

Php 设置变量时,为什么会收到ErrorException通知未定义变量?

Php 设置变量时,为什么会收到ErrorException通知未定义变量?,php,kohana,Php,Kohana,视图: 及 抛出相同的错误。您绝对确定要传入给定的控制器吗?是的,传递到view Normal的其他变量让我很抱歉,因为我太粗心了。视图中有一个带有函数的foreach,我没有注意到它。Function不知道这个变量。你绝对确定要传入给定的控制器吗?是的,传递到view Normal的其他变量让我很抱歉,因为我太粗心了。视图中有一个带有函数的foreach,我没有注意到它。而Function不知道这个变量。 class ControllerProduct extends Common { p

视图:


抛出相同的错误。

您绝对确定要传入给定的控制器吗?是的,传递到view Normal的其他变量让我很抱歉,因为我太粗心了。视图中有一个带有函数的foreach,我没有注意到它。Function不知道这个变量。你绝对确定要传入给定的控制器吗?是的,传递到view Normal的其他变量让我很抱歉,因为我太粗心了。视图中有一个带有函数的foreach,我没有注意到它。而Function不知道这个变量。
 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 '>
var_dump( $this->template->content->sellers_shop_id ); // show var's content
$this->template->sellers_shop_id = $sellers_shop_id;