FileResponse
class FileResponse (View source)
Constants
| ACCEL |
|
| SENDFILE |
|
| FALLBACK |
|
Methods
__construct(string $source, string $filename = '')
Initialize the response with a file path and optional download name
static bool
available(int $mode)
Check if a specific delivery mode is supported by the server environment Note: In the built-in web server, all modes will return true, allowing you to use the simulator to deliver the file
send(int $modes, bool $overwrite = false)
Dispatch the file using the preferred available delivery method
Details
__construct(string $source, string $filename = '')
Initialize the response with a file path and optional download name
static bool
available(int $mode)
Check if a specific delivery mode is supported by the server environment Note: In the built-in web server, all modes will return true, allowing you to use the simulator to deliver the file
send(int $modes, bool $overwrite = false)
Dispatch the file using the preferred available delivery method