mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 16:45:35 +08:00
fix route-annotations.md static file server demo (#166)
This commit is contained in:
@@ -231,10 +231,10 @@ $config['static_file_server'] = [
|
|||||||
```php
|
```php
|
||||||
/**
|
/**
|
||||||
* @RequestMapping("/images/{filename}")
|
* @RequestMapping("/images/{filename}")
|
||||||
* @param $param
|
* @param array $param
|
||||||
* @return StaticFileHandler
|
* @return StaticFileHandler
|
||||||
*/
|
*/
|
||||||
public function staticImage($param) {
|
public function staticImage(array $param) {
|
||||||
Console::info("[下载图片] " . $param["filename"]);
|
Console::info("[下载图片] " . $param["filename"]);
|
||||||
return new StaticFileHandler($param["filename"], "/path/to/your/image_dir/");
|
return new StaticFileHandler($param["filename"], "/path/to/your/image_dir/");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user