Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 Sinatra 应用程序来替换旧的基于 PHP 的应用程序。
get '/page.php' do # ... do something end
我正在尝试定义这样的路线,但我得到“Sinatra 不知道这个小曲”。错误页面。
在页面顶部,我有这个
configure do mime_type :php, 'text/html' end
知道如何告诉 Sinatra 使用包括文件扩展名在内的整个路径作为其中的一部分?