【发布时间】:2012-10-01 10:45:55
【问题描述】:
我是 Codeigniter 的新手。提交表单时,我收到 404 错误页面未找到。实际上,无需输入用户名和密码,它应该可以进行评估。这是代码。
控制器中的login.php
public function verifyuser()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('username','username','required');
$this->form_validation->set_rules('password','password','required');
if($this->form_validation->run() == FALSE){
$this->load->view('login/login');
}else{
$this->load->model('login/validate');
}
}
*登录/login.php*
<?php echo form_open('verifyuser'); ?>
<!-- start login-inner -->
<div id="login-inner">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<th>Username</th>
<td><input type="text" name="username" class="login-inp" /></td>
</tr>
<tr>
<th>Password</th>
<td><input type="password" name="password" value="************" onfocus="this.value=''" class="login-inp" /></td>
</tr>
<tr>
<th></th>
<td valign="top"><input type="checkbox" class="checkbox-size" id="login-check" /><label for="login-check">Remember me</label></td>
</tr>
<tr>
<th></th>
<td><input type="submit" value="submit" class="submit-login" /></td>
</tr>
</table>
</div>
【问题讨论】:
-
答案是login/login.php
标签: php codeigniter codeigniter-2