0

我仅将 https 用于登录操作,因此当我们发布无效密码时,它将刷新页面并显示验证错误,在这种情况下,https 将阻止所有以 http 开头的 css、js .. 资源。

顺便说一句,我正在使用 Yii 客户端包注册:

  Yii::app()->clientScript->registerPackage('login');

这里登录是一个资产包:

  'login' => array(
    'js'  => array('js/jquery.js', 'js/bootstrap.js', 'js/other.js'),
    'css' => array('css/other.css'),
    'depends'  => array('jquery'),
    'basePath' => 'theme'
   ),

因此,例如 css 文件将阻塞并选择要破坏的页面的样式。

有什么办法吗?

4

1 回答 1

0

您可能想研究设置basePath包的属性。更多细节在这里:http ://www.yiiframework.com/doc/api/1.1/CClientScript#packages-detail

于 2013-07-28T13:57:15.713 回答