السلام عليكم ورحمة الله وبركاته.
أما بعد :
عملت برنامج لتحميل الملفات وتخزين المسار في قاعدة البيانات.
وملف لتحميل الملف من الموقع :
<html dir="rtl">
<head>
<title>تحميل الملفات</title>
<meta name="keywords" content=تحميل الملفات">
<meta name="description" content=تحميل الملفات">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<?
$sql = "SELECT `filelink`,`filename` FROM `attachment` WHERE id='". $_GET["id"] ."' and subject_id='". $_GET["PRO"] ."'";
$result = mysql_query(sql);
if (!result)
{
echo "error mes";
exit();
}
$rows = mysql_fetch_array($result);
header("Content-Disposition: attachment;filename=" . $rows['filename'] . "");
header("Content-type: application/download");
$read = @readfile($rows['filelink']);
?>ولكن عند التنفيذ يظهر لي الخطأ التالي.
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\personalproject\includes\config.php:5) in C:\AppServ\www\personalproject\attachment.php on line 108 Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\personalproject\includes\config.php:5) in C:\AppServ\www\personalproject\attachment.php on line 109
وهل توجد طريقة أفضل لإخفاء مسار الملف.
والله ولي التوفيق.
أخوكم أبو النور.
