Yii Widget,意外),错误在哪里? [英] Yii Widget, unexpected ), where is the error?
本文介绍了Yii Widget,意外),错误在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?php
$this->widget('bootstrap.widgets.TbAlert', array(
'block'=>true, // display a larger alert block?
'fade'=>true, // use transitions?
'closeText'=>'×', // close link text - if set to false, no close link is displayed
'alerts'=>array( // configurations per alert type
'success'=>array(
'block'=>true,
'fade'=>true,
'closeText'=>'×',
), // success, info, warning, error or danger
),
),
);
?>
PHP 解析错误:第 14 行/dev/shm/untitled.php 中的语法错误,意外的 ')'
PHP Parse error: syntax error, unexpected ')' in /dev/shm/untitled.php on line 14
我真的找不到错误,看了一百遍.需要实现这个小部件,谢谢!
I really can't find the error and watched it like 100 times. Need to implement this widget, thanks!
有 4 个左括号和 4 个右括号.逗号没问题,所以...?
There are 4 opening parenthesis and 4 closing. Commas are ok, so... ?
推荐答案
<?php
$this->widget('bootstrap.widgets.TbAlert', array(
'block'=>true,
'fade'=>true,
'closeText'=>'×',
'alerts'=>array(
'success'=>array(
'block'=>true,
'fade'=>true,
'closeText'=>'×'
),
),
), // you have comma here - it's mistake
);
?>
这篇关于Yii Widget,意外),错误在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文