[英]Using https instead of http when registering a client package using Yii framework
我仅将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文件将被bock并选择要破坏的页面样式。
有什么办法吗?
您可能想研究设置包的basePath
属性。 此处有更多详细信息: http : //www.yiiframework.com/doc/api/1.1/CClientScript#packages-detail
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.