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