请问CGridView增加一个button时,url的写法问题 [ 新手入门 ]
这种写法不对,
array
(
    'class'=>'CButtonColumn',
    'template'=>'{email}{down}{delete}',
    'buttons'=>array
    (
        'email' => array
        (
            'label'=>'Send an e-mail to this user',
            'imageUrl'=>Yii::app()->request->baseUrl.'/images/email.png',
            'url'=>'<a href="http://172.30.1.1/Yii/applicationdemo/index.php">Link Text</a>',
        ),
        
    ),
),
换成
array
(
    'class'=>'CButtonColumn',
    'template'=>'{email}{down}{delete}',
    'buttons'=>array
    (
        'email' => array
        (
            'label'=>'Send an e-mail to this user',
            'imageUrl'=>Yii::app()->request->baseUrl.'/images/email.png',
            'url'=>'http://172.30.1.1/Yii/applicationdemo/index.php),
        
    ),
),
也不对
因为我这是一个外部网址,不是Yii生成的,外部网址能用createurl吗?如果无法用,那这个地方要怎么写呢?
共 9 条回复
onunix china
            注册时间:2012-03-19
最后登录:1970-01-01
在线时长:0小时0分
    最后登录:1970-01-01
在线时长:0小时0分
- 粉丝2
 - 金钱1145
 - 威望0
 - 积分1145