mirror of
https://github.com/bcit-ci/CodeIgniter.git
synced 2025-02-20 11:13:29 +08:00
Typo fix, I think - $absolute was within quotes, with periods left and right
parent
b87f9ffb1e
commit
4bc4e0d5bd
@ -1,5 +1,6 @@
|
||||
Feel free to improve it here, but PLEASE fill the 'notes' field below to explain your contribution.
|
||||
|
||||
|
||||
[h3]documentation[/h3]
|
||||
An url like http://www.your-site.com/index.php/browser/[b]virtual_root[/b]/[b]path[/b] will allow people to browse directories and files that are under [b]path[/b] from [b]absolute_path[/b]. You define an [b]absolute_path[/b] (in the file system of the server) for a [b]virtual_root[/b] with this array
|
||||
[code]
|
||||
@ -10,6 +11,7 @@ var $roots = array(
|
||||
[/code]
|
||||
This may allow us to browse files that are outside your web root, forcing the browsing via CI, and allowing us full control on accesses (not provided for the moment).
|
||||
|
||||
|
||||
[h3]todo[/h3]
|
||||
* stats for directories and files
|
||||
* links for sorting directories and files
|
||||
@ -18,6 +20,12 @@ This may allow us to browse files that are outside your web root, forcing the br
|
||||
* bells and hooks and whistles and filters to check accesses
|
||||
* ...
|
||||
|
||||
|
||||
[h3]changes[/h3]
|
||||
2009-10-22 - annoted in-code, line 98 of controller, '.$absolute.' changed to $absolute
|
||||
|
||||
|
||||
|
||||
[h3]the controller[/h3]
|
||||
[code]
|
||||
<?php
|
||||
@ -117,7 +125,8 @@ class Browser extends Controller {
|
||||
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Length: ' . filesize( ".$absolute_path." ));
|
||||
// header('Content-Length: ' . filesize( ".$absolute_path." )); // Modified
|
||||
header('Content-Length: ' . filesize( $absolute_path ));
|
||||
header('Content-Disposition: attachment; filename=' . basename( $absolute_path ));
|
||||
|
||||
@readfile( $absolute_path );
|
||||
|
Loading…
x
Reference in New Issue
Block a user