hebo5485

hebo5485

这家伙有点懒,还没写个性签名!

  • 财富值4600
  • 威望值30
  • 总积分5560

个人信息

  • 2016-06-22 已签到
    连续签到3天,获得了15个金钱
  • 2016-06-21 已签到
    连续签到2天,获得了10个金钱
  • 2016-06-20 已签到
    连续签到1天,获得了5个金钱
  • 2016-06-17 已签到
    连续签到6天,获得了20个金钱
  • 谢谢两位解答,然而还是报错:

    PHP Warning – yii\base\ErrorException
    
    Cannot use a scalar value as an array
    1. in E:\www\yii2test\vendor\yiisoft\yii2\helpers\BaseHtml.php at line 261
     *
         * The rest of the options will be rendered as the attributes of the resulting script tag. The values will
         * be HTML-encoded using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
         * See [[renderTagAttributes()]] for details on how attributes are being rendered.
         * @return string the generated script tag
         * @see Url::to()
         */
        public static function jsFile($url, $options = [])
        {
            $options['src'] = Url::to($url);
            if (isset($options['condition'])) {
                $condition = $options['condition'];
                unset($options['condition']);
                return self::wrapIntoCondition(static::tag('script', '', $options), $condition);
            } else {
                return static::tag('script', '', $options);
            }
        }
    
  • 2016-06-16 已签到
    连续签到5天,获得了20个金钱
  • 发布了话题
    在视图中引入js的问题
  • 赞了评论

    使用Url::to()也是可以的。方法如下:

    <?php
    use yii\helpers\Url;
    ......
    Url::to(['site/index']);
    
  • 2016-06-15 已签到
    连续签到4天,获得了20个金钱
  • 2016-06-14 已签到
    连续签到3天,获得了15个金钱
副总裁 等级规则
5560/10000
资料完整度
10/100
用户活跃度
0/100

Ta的关注

3

Ta的粉丝

8

Ta的访客

41