pavelthq / simple-file-manager

Updated. A Simple PHP file manager. The code is a single php file.
MIT License
7 stars 2 forks source link

Select the path to see it's content #4

Open sdaverede opened 8 years ago

sdaverede commented 8 years ago

how could we make it posible to config to see only certain folder eg "uploads", and its content?

Thanks in advance, also one more question, why in the breadcumbs apears this weird path: Home ▸ |.. ▸ |../* ▸ .

and-jan commented 8 years ago

If you only want to allow file access in the base directory (same as me), just append the following lines at the beginning of the index.php right under setlocale: tmp = realpath($_REQUEST['file']); if($tmp === false) err(404,'File or Directory Not Found'); if(substr($tmp, 0,strlen(__DIR__)) !== __DIR__) err(403,"Forbidden");

sdaverede commented 8 years ago

Thanks for your answer, i'm sorry for not expressing the idea ok, the think i meant to do is to put the script on the folder: home/viewfiles.php, but fetch with viewfiles.php the files and folder from home/uploads

Thanks in advance!