我需要一個CSS類應用到一個CGridView的專欄,我得到一個PHP通知錯誤警予 - 利用類的CGridView的列顯示的PHP警告
這是代碼
$this->widget('zii.widgets.grid.CGridView', array(
'htmlOptions'=>array('class'=>'table table-striped table-bordered table-condensed'),
'dataProvider'=>new CArrayDataProvider(getArray()),
'template'=>"{items}",
'columns'=>array(
array('name'=>'title', 'header'=>'Title', 'cssClassExpression'=>'span3'),
array('name'=>'url', 'header'=>'url'),
),
));
而且這是我得到的通知:
PHP notice
Use of undefined constant span3 - assumed 'span3'
如果我禁用PHP通知我正確地看到應用於我的列的css類。
有誰知道爲什麼會發生這種情況?
謝謝
你有一個地方沒有引用'span3'字符串 –
不幸的是,我已經檢查了整個文件,我只有這種情況。我想我已經找到了解決方案,無論如何,謝謝! – MeV