topical media & game development
professional-sql-06-public-files-download.php / php
<?php
include '../lib/common.php';
include '../lib/config.php';
// prevent users from traversing outside the base directory
_POST['dir'];
dir . '/' . target, BASEDIR) !== 0)
{
die();
}
// send the file if it exists
if (file_exists(target))
{
header('Content-Type: application/force-download');
header('Content-Disposition: attachment; filename="' .
target));
readfile(
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.