Ftp de attığınız dosya login kontrolü ile olsun mu istiyorsunuz, o zaman bu yazdığım kod tam sizlik.. Kısa ve öz;
htaccess içine;
RewriteEngine on RewriteRule ^(.+\.pdf)$ index.php?file=$1 [L]
ve index.php içine yazmanız gereken;
/*01.02.2013 Onur*/
session_start();
//kontrol yapalım
if($_SESSION['userid'] >0)
{
if($_GET['file']<>"")
{
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$_GET['file'].'"');
readfile($_GET['file']);
}
}
else
{
header('location:../login.php');
}
iyi çalışmalar dilerim..
