?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Login extends Controller
{
function index()
{
$data['main'] ='';
$data['error'] = '';
if($this->input->post('username'))
{
$username = $this->input->post('username');
$password = $this->input->post('password');
$config = $this->maincore->get_config();
if($username == $config['admin_username'] && md5($password) == $config['admin_password']){
$value = $username.".".md5($password);
$time = 9000;
if($this->input->post('remember')) {
$time = time()+3600*24*5;
}
setcookie("feeder_login", $value, $time, '/');
echo '<meta http-equiv="refresh" content="0;url='.$this->config->site_url().'">';
exit;
我在 chrome 和 firefox 中清除了我的 cookie。在我的脚本运行之后。根本没有新的cookies。
我知道脚本正在运行,因为它在运行后将我重定向到主页。