0
如何在路徑路徑中允許所有特殊字符:a-z A-Z和?。!:/ _()'?我試過這個,但它根本不起作用。因爲我想製作一個錯誤報告操作,它發送一封包含當前錯誤描述的電子郵件。如何允許路由中的所有特殊字符(Symfony2)
bugReport:
path: /bugReport/{eStatusCode}/{eMessage}
defaults: { _controller: utilisateurBundle:ExceptionReport:bugReport }
requirements:
eMessage: .[a-zA-Z1-9\-_\/?;!"`'()`\|{}]+
options:
expose: true
任何人都可以幫助我嗎?
我覺得你確實需要'eMessage: 「[?!A-ZA-Z0-9 _ /; \」 \''()| {} - ] +「'。 –