我有一个非常基本的设置,带有一个新的 Fuel 结帐。
fuel/app/classes/controllers/auth.php
class Controller_Auth extends Controller
{
public function action_login()
{
return View::forge('auth/login');
}
}
fuel/app/views/auth/login.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FuelPHP Framework</title>
<?php echo Asset::css('bootstrap.css'); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<style>
#login-block {
margin: auto;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
padding: 5px;
}
</style>
</head>
<body>
<div id="content" class="container-fluid">
<div id="login-block">
<h1>Login</h1>
</div>
</div>
<?php echo Asset::js('jquery.min.js'); ?>
<?php echo Asset::js('bootstrap.js'); ?>
</body>
</html>
fuel/app/config/routes.php
return array(
'_root_' => 'settings/index', // The default route
'_404_' => '404', // The main 404 route
'login' => 'auth/login',
);
但是,访问http://localhost/tmp/public/login
给出了 404。我错过了什么?