Hi
To do this your way, which is not the best way do this!
do this!
PHP Code:
header ( 'Location: ../DOWNLOADS/' . $_REQUEST['asset'] );
exit ();
To do it so that you validate the request (don't do something if something does not exist)
Then you would this!!!
PHP Code:
<?
// system path to files windows full path ie: 'c:/www/docs/files/'
$system = './http_docs/files/';
// url to the files directory!
$url = '/downloads/';
if ( ! empty ( $_REQUEST['asset'] ) && is_readable ( $system . $_REQUEST['asset'] ) )
{
header ( 'Location: ' . $url . $_REQUEST['asset'] );
exit ();
}
else if ( empty ( $_REQUEST['asset'] ) )
{
echo 'no valid file request sent';
}
else
{
echo 'file not found';
}
<?
Sonia