Delete file after download |
I have a situation that should download and delete the file. Is there any possibility?
I'm using this function in response: PHP Code: return $response->download($name, $data); Anything like that, for example: PHP Code: // Other framework This is the bad solution? PHP Code: Controller: Im using PHP Spreedsheet library.
To delete a file you use unlink(path/filename);
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
This may help not sure.
CodeIgniter 4 User Guide - Uploaded Files What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You can trigger a delete function via jquery / ajax when you click the download button.
|
Welcome Guest, Not a member yet? Register Sign In |