是否可以使用代码点火器加密库加密angularjs值?这是我的密码
<tr ng-repeat="row in data">
<td><a href="<?php echo site_url('users/details/'.$this->encrypt->encode("{{row.userid}}")); ?>">{{row.fullname}}</a></td>
</tr>现在,我想加密userid。那件事怎么可能?
In my Users.php
public function details($id) {
echo $this->encrypt->decode($id) // the result is {{row.id}}
}我想得到{{row.id}}的实际值,即10
我怎么能这么做?有什么帮助吗?谢谢:)
发布于 2018-09-16 07:38:50
您可以在javascript中设置cookie:
document.cookie='userId='+userId;然后进入代码点火器:
get_cookie(''); //or use $_COOKIE["userId"]那么这个值就掌握在你的手中来加密。
https://stackoverflow.com/questions/41998675
复制相似问题