Is it possible to export a PHP MySQL Excel sheet to a specified path such as USB Flash Drive.
Its because I’m using php as Point of Sale and all What i want now is once you click on a Button- it will collects records from MySQL database and exports it as excel or csv file to a USB Flash Drive.
I’ve tried to Google it out, but I can’t seem to find anything.
Thank You.
You need to write the file. To write to usb drive you just need to specify correct file path. If you’re on *nix it would be like
/media/USB/on linux or/Volumes/USB/on Mac. For Windows it would be likeF:/.so rough example is like
Manual for
fputcsvis here.If needed, you can ask user for a file path in any way supported by your application.