【发布时间】:2017-02-02 09:38:11
【问题描述】:
是否可以使用 codeigniter 加密库加密 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。这怎么可能?
在我的 Users.php 中
public function details($id) {
echo $this->encrypt->decode($id) // the result is {{row.id}}
}
我想得到 {{row.id}} 的实际值,即 10
我该怎么做?有什么帮助吗?谢谢:)
【问题讨论】:
-
你有输出吗?
-
是的,结果是{{row.id}},看来{{row.id}}转换成字符串不是angularjs中的值
-
控制台有错误吗?
-
不,没有错误。
标签: php angularjs codeigniter encryption