Hi,
I am currently hosting binary format of a game save files on my server. The strange thing is, I have to give Execute right to Public, User and Owner for upload folder before others can download it. How can I serve the file to them from the upload folder without having to directly link to the upload folder?
Download links to files
Moderator: General Moderators
-
LonelyProgrammer
- Forum Contributor
- Posts: 108
- Joined: Sun Oct 12, 2003 7:10 am
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Download links to files
How about using an include and then within the include use an id to fetch the corresponding file from a database.
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Download links to files
I believe you can make a php page that will 'return' the document, as it were.
Something around this type of thing, but I'm sure this right here doesn't work. I've never done it before:
Something around this type of thing, but I'm sure this right here doesn't work. I've never done it before:
Code: Select all
<?php
$file = file_get_contents('the file address');
header('Content-type', 'the type of the file');
echo $file;
?>