|
#1
|
|||
|
|||
php help please..
k, i have this site and on it i have links to text files, but normally when you click the link - the link opens the file in the browser... what i want is instead of viewing it, i want to make the text files downloads...
the reason for this is i made a word search puzzle maker, but i am also offering free puzzles you can download. the puzzles are txt files - so viewing them is not what i want, but instead for them to download them and put them in the apps puzzle folder so they can play them with the app.
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following: can fix most photos (wallets, 8x10, etc..)... can code in vb 6.0... html and some css... made a couple of Nintendo DS games and working on more... i want to learn php eventually... |
#2
|
||||
|
||||
There isn't a sure way to make links that will download. Those are processed on the browser depending on the users settings.
Try using buttons: <form><input type="button" value="Download Now" onClick="window.location.href='Your.txt'"></form> I haven't tested it but it's worth a shot. |
#3
|
|||
|
|||
Maybe this PHP Code helps:
<? header('Content-Disposition: attachment; filename="downloaded.pdf"'); ?> It'll force the browser to display the file download dialog. |
#4
|
||||
|
||||
Perhaps this'll help?
http://php.net/manual/en/function.readfile.php
__________________
Sorry about all the questions... :( I'm starting to feel like a total nuisance, but I am trying to find them in Google before I post them. |
#5
|
||||
|
||||
Well the OP's last activity was in Oct 2011...
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
What's New? |
What's Hot? |
What's Popular? |