コントローラーをロードすると、次のようになります。
$this->load->library('encrypt');
$get = null;
parse_str($_SERVER['QUERY_STRING'],$get);
$email = $this->encrypt->decode($get["acc"]); // e.g. www.lol.com/?acc=troll
そして、私のコントローラーは次のように呼び出されます:
$this->load->library('encrypt');
$this->load->helper("url");
$user = $this->input->post('email', true);
$encrypted_string = $this->encrypt->encode($user);
redirect('account/viewaccount?acc='.$encrypted_string);
URL は次のようになります。
http://localhost/CodeIgniter/index.php/account/viewaccount?acc=+fgSAs6X7ysW6XDjFVw//9RGVbY751zZv1LQ44yYBjhVuzI1BC1t9BbZCIUdX5lpYA==
しかし、問題は、エンコードすると値が得られるが、後でこの巨大な値をデコードすると (テストによってこの値を完璧に受け取ることができる)、何も返されず、NULL だけが返されることです。
なぜこうなった?
ありがとうございました