0

我现在拥有的是:

$app->get(/folderBrowse/:path function($app){
bla bla bla 

}); // I know this is not using '' or , 
but it's just for example, because I've tried it with many configurations. my 
syntax is correct in my code, because it works fine when I don't pass a path

但是当我传递一个文件路径时,即使使用 URL 编码它也会给我一个 404 页面。有什么我想念的吗?

任何帮助将不胜感激。

4

1 回答 1

0

现在您可以像这样通过 url 发送文件路径之类的东西

http://localhost/api/something?file_path=some url encoded string

$app->get('/something', function() use($app) {
  $file_path = $app->request()->get('file_path');
call some other stuff... etc

}); 
于 2013-04-17T22:24:04.330 回答