且试天下

且试天下

全栈工程师 熟悉 Python、PHP、前端

  • 财富值5090
  • 威望值160
  • 总积分7440

个人信息

  • 回复了 的回答

    我用layer插件 大公司都用这个插件 兼容IE6

    开源的 中国移动 都在用

  • 回复了 的回答

    哥们感谢你的提醒,不晓得你修改的是哪个版本的,我现在的是v2.0.9,我看了baseHtml是OK的啊。

     /**
         * Generates an image tag.
         * @param array|string $src the image URL. This parameter will be processed by [[Url::to()]].
         * @param array $options the tag options in terms of name-value pairs. These will be rendered as
         * the attributes of the resulting 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 image tag
         */
        public static function img($src, $options = [])
        {
            $options['src'] = Url::to($src);
            if (!isset($options['alt'])) {
                $options['alt'] = '';
            }
            return static::tag('img', '', $options);
        }
    

    这应该是以前某个版本的bug 应该是2.0.8版本的 2.0.9版本的没有这个问题

  • 我用layer插件 大公司都用这个插件 兼容IE6

  • 2016-08-19 已签到
    连续签到1天,获得了5个金钱
  • 提出了问题
    yii Html类生成img标签的bug
  • 2016-08-16 已签到
    连续签到1天,获得了5个金钱
  • 可以使用场景 来规避此问题

  • 2016-08-12 已签到
    连续签到1天,获得了5个金钱
  • 2016-08-10 已签到
    连续签到1天,获得了5个金钱
副总裁 等级规则
7440/10000
资料完整度
40/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

64

Ta的访客

413