bobrivers2003
Technical User
I have a php script that exports all the structure and data from a mysql db, the file is saved on the server, as it is a back up of the server db I wish to download it to a client when the back up file is created.
I have tried using
Header("Content-type: application/msword");
Header("Content-Disposition: attachment; filename=backup.txt");
echo "CONTENTS OF FILE ON SERVER";
I need to open the server file, loop through each line and print to backup.txt
Does anyone have any pointers on how this can be achieved?
Many Thanks
I have tried using
Header("Content-type: application/msword");
Header("Content-Disposition: attachment; filename=backup.txt");
echo "CONTENTS OF FILE ON SERVER";
I need to open the server file, loop through each line and print to backup.txt
Does anyone have any pointers on how this can be achieved?
Many Thanks