2015年5月28日 星期四

CI之CSRF設定

config\config.php

設定
$config['csrf_protection'] = TRUE;


view
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name()?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />

註:檢查表單是否有值

沒有留言:

張貼留言