我是 symfony 的新手,也许我错过了一些非常简单的东西,但我无法发现它。任何帮助都感激不尽。我有这两个文件:
C:\xampp\htdocs\Symfony\src\Apps01\ResourceCalBundle\Resources\config\routing.yml
ResourceCalendar_Login:
pattern: /resourcecalendar/login
defaults: { _controller: AppsRollerResourceCalBundle:Login:DisplayLogin }
C:\xampp\htdocs\Symfony\src\Apps01\ResourceCalBundle\Controller\LoginController.php
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class LoginController
{
public function DisplayLoginAction()
{
return new Response('<html><body>Hello There!</body></html>');
}
}
然而,当我将浏览器指向http://example.com/Symfony/web/app_dev.php/resourcecalendar/login时,出现以下错误:
The autoloader expected class "Apps01\ResourceCalBundle\Controller\LoginController" to be defined in file "C:\xampp\htdocs\Symfony/src/\Apps01\ResourceCalBundle\Controller\LoginController.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
500 Internal Server Error - RuntimeException
LoginController
当我看到类肯定存在于文件管理器中时,有人能指出我缺少什么吗?
谢谢艾尔