I am trying to set and get a cookie in kohana framework, but I don't know how to call the class cookie in my controller.
<?php
class Landing_Page_Controller extends Controller {
public function __construct() {
parent::__construct();
}
public function index() {
setcookie("kohanaSalt", "testKohanadata" , time()+3600);
}
}
?>
The above is a simple way to set a cookie from php, but I want to set this cookie into session and do so using kohana, if its possible.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…