Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [symfony] The server returned a "404 Not Found"., Wywołanie kontrolera
client202
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 18.11.2015

Ostrzeżenie: (0%)
-----


Witam

Zaczynam dopiero przygodę z Symfony i mam problem już na początku, a dokładniej z wywołaniem kontrolera.
Pracuje lokalnie (xampp)

Mój kontroler wygląda tak:

  1. <?php
  2.  
  3. namespace My\HelloWorldBundle\Controller;
  4.  
  5. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  6. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  7. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  8.  
  9. class DefaultController extends Controller
  10. {
  11. /**
  12.   * @Route("/hello/{name}")
  13.   * @Template()
  14.   */
  15. public function indexAction($name)
  16. {
  17. return array('name' => $name);
  18. }
  19. }


Po wprowadzeniu adresu
http://localhost/symf/hello-world/web//hello/aaabb

otrzymuje komunikat:
Oops! An Error Occurred
The server returned a "404 Not Found".

Z góry dziękuje za pomoc.

Ten post edytował client202 19.11.2015, 00:21:02
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.10.2025 - 01:58