我正在做一個列出文件的谷歌驅動器API的捆綁。如果用戶需要授予權限或者已經授予權限,那麼我在IndexAction中有這樣的權限。如果需要,那麼我從谷歌獲得的網址,並重定向到該鏈接。Symfony2無法找到行動的路線
在谷歌控制檯我把作爲重定向鏈接:
www.googlebundle/firstTime
在我GoogleDriveController我已經得到了
public function firstTimeAction() {
(...)
}
而在我的路由我得到這個:
FilesGoogleDriveBundle_firstTime:
pattern: /firstTime
defaults: { _controller: "FilesGoogleDriveBundle:GoogleDrive:firstTime" }
requirements: { _method: get }
FilesGoogleDriveBundle_homepage:
pattern: /Drive/{id}
defaults: { _controller: FilesGoogleDriveBundle:GoogleDrive:index }
但是我在prod.log中得到這個錯誤:
[2012-11-26 16:50:14] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /firstTime" (uncaught exception) at /var/www/Symfony/app/cache/prod/classes.php line 4564 [] []
有誰知道發生了什麼?
可以運行'PHP應用程序/控制檯路由器:debug'和後輸出? – MrGlass
也,你清除你的緩存?路由被緩存,即使在開發中。 – MrGlass
您的.htaccess文件是否正確地將'/ app.php'重寫爲'/'? – Squazic