any one help me please i have problem in download.php
<?php
include('core/init.inc.php');
if (isset($_GET['file_id'])) {
$file_id = (int)$_GET['file_id'];
$file = mysql_query("SELECT `file_name`, `file_expiry` FROM `files` WHERE `file_id` = {$file_id}");
if (mysql_num_rows($file) !=1) {
echo 'file ID is invalid';
}
else {
$rows = mysql_fetch_assoc($file);
if ($row['file_expiry'] < time()){
echo "this file hase been expired";
}
else{
$path = "core/file/{$row['file_name']}";
header('content-Type: application/octetstream');
header('Content-Type: application/octet-stream');
header('Content-Description: File Transfer');
//header(Content-Description: attachment; filename=\{$row['file_name']}\);
header('Content-Length:' . filesize($path));
readfile($path);
}
}
}
?>
<html>
<head>
<title>better php blog tutorials</title>
</head>
<body>
<div>
</body>
</html>
temprarely download problem (download.php)
Re: temprarely download problem (download.php)
please use the code tags.
And also, what is the problem? Explain.
Do you get any errors?
[syntax=php]Code goes here[/syntax]
And also, what is the problem? Explain.
Do you get any errors?
Re: temprarely download problem (download.php)
Please follow at least some of the posting guidelines !