search

Home  >  Q&A  >  body text

symfony2 redirection issue.

Can redirection in symfony2 only be done in the controller controller? Is it not possible if it is in a file other than the controller? If it is possible, please let me know if someone knows.

伊谢尔伦伊谢尔伦2791 days ago797

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:46:33

      In
    1. Controller, the master already knows
    2. You can use js’s window.location to jump to the page
    3. In a file other than the controller? The master’s needs are somewhat different. . . It is recommended that the logic of page jump is placed in the Controller, because the page jump is also a Response and must be returned within the Controller. Another point is that page jumps are placed everywhere. If you jump here and there, you will not know where to jump. . . If the masturbator really wants to jump, just header.

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 16:46:33

    Don’t be bound by the framework, come to the original how to use symfony2 or how to jump

    window.location

    Everything is fine

    reply
    0
  • Cancelreply