【问题标题】:How URL encrypt and decrypt in Codeigniter. Every Refresh encrypted value change在 Codeigniter 中 URL 如何加密和解密。每次刷新加密值更改
【发布时间】:2017-08-18 19:45:40
【问题描述】:

我想加密我的 url 参数,例如: http://localhost/myapps/user/profile/johnhttp://localhost/myapps/user/profile/{'john' 的加密值}

在代码点火器中。

另一方面,每次刷新特定数据的加密值都会发生变化。但我需要这个静态(特定输入值的唯一值总是)。

【问题讨论】:

标签: php codeigniter


【解决方案1】:

【讨论】:

  • 谢谢。我已经实现了这个,但是每次刷新加密值都会改变,所以我不能回到我的原始数据。
【解决方案2】:
$this->load->library('encrypt');//load this library. 
$config['encryption_key'] = "YOUR KEY"; // application/config/config.php
$this->encrypt->encode();//Data encryption and returns it as a string
$this->encrypt->decode();//Decrypts an encoded string. 

【讨论】:

  • 请给出更多解释如何解决这个问题
猜你喜欢
  • 2015-05-04
  • 2011-02-27
  • 1970-01-01
  • 2011-12-06
  • 1970-01-01
  • 1970-01-01
  • 2019-04-07
  • 2018-08-04
  • 2013-11-18
相关资源
最近更新 更多