-3

i have a website which is resposive and built mainly for mobile use, Now i want to save a text file to mobile either memory, But from what i have tried it directly saves the file in server. is there a way to save it in mobile memory or giving such patch that it can be saved outside the root directry?

$handle = fopen($backup_name,'w+');
fwrite($handle,$content);
fclose($handle);
echo 'done';

this is what i have checked so far, in pc i can store it any where but i need it to store in certain location of mobile

Mps
  • 131
  • 1
  • 12

1 Answers1

0

make .htaccess file inside your downloadable content folder and put below code, Then it will download instead of showing the code.

AddType application/octect-stream .txt

If it is a .txt file you should do like above. You can put any file type by it's extension.

LahiruTM
  • 638
  • 4
  • 16