Sinatra error when handling .php routes

你。 提交于 2019-12-13 04:08:17

问题


I'm creating a Sinatra app to replace a legacy PHP based app.

get '/page.php' do
  # ... do something
end 

I'm trying to define a route like this but I get "Sinatra doesn't know this ditty." error page.

At the top of the page, I have this

configure do
  mime_type :php, 'text/html'
end

Any idea how to tell Sinatra to use the whole path including the file extension as part of it?

来源:https://stackoverflow.com/questions/11343991/sinatra-error-when-handling-php-routes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!