Edit File by line
/home/barbar84/www/extracte.../filemang...
File: file_download.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
define('ACCESS', true);
[3] Fix | Delete
[4] Fix | Delete
include_once 'function.php';
[5] Fix | Delete
[6] Fix | Delete
[7] Fix | Delete
$title = 'Download File';
[8] Fix | Delete
[9] Fix | Delete
if ($dir == null || $name == null || !is_file(processDirectory($dir . '/' . $name))) {
[10] Fix | Delete
include_once 'header.php';
[11] Fix | Delete
[12] Fix | Delete
echo '<div class="title">' . $title . '</div>';
[13] Fix | Delete
echo '<div class="list"><span>The path does not exist</span></div>
[14] Fix | Delete
<div class="title">Function</div>
[15] Fix | Delete
<ul class="list">
[16] Fix | Delete
<li><img src="icon/list.png"/> <a href="index.php">List</a></li>
[17] Fix | Delete
</ul>';
[18] Fix | Delete
[19] Fix | Delete
include_once 'footer.php';
[20] Fix | Delete
} else {
[21] Fix | Delete
$dir = processDirectory($dir);
[22] Fix | Delete
$path = $dir . '/' . $name;
[23] Fix | Delete
[24] Fix | Delete
header('Content-Type: application/octet-stream');
[25] Fix | Delete
header('Content-Disposition: inline; filename=' . $name);
[26] Fix | Delete
header('Content-Length: ' . filesize($path));
[27] Fix | Delete
readfile($path);
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
[31] Fix | Delete
?>
[32] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function