Route with the character "."

Asked

Viewed 34 times

0

Personal need to create a route in which a parameter of it is a filename with the extension. How do I create this one? Ex. http://localhost:8080/download/.pdf file

I created so but error because of stitch before PDF.

$app->get('/download/:arquivo', function($arquivo) use($app) {...});

Obrgado

1 answer

0

Back in the documentation There are some ways to do that. Some of them: /download/{file}

Just one more thing, which error do you get? route not found? or just can’t read the extension?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.