ia have file to open in web browser in folder and sub folder 'slipgaji', i can show all my file on latest sub folder just put link below :
http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1556.pdf
or http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1557.pdf
or http://localhost:8081/intranet/slipgaji/2013/1-2013/2013.05.1558.pdf
that condition allow user show others my file, i need just user with id file name like 2013.05.1556 only open or download it file like name 2013.05.1556.pdf on latest sub directory then user with id 2013.05.1556 set to can't open others file, how to i get that code ???
thanks.
I think your title not related with content. Maybe you mean :'Avoid direct access into a file in a folder'? For this case, you should mask a download parameter, to avoid accept paths as input and combine it using header correctly. This references maybe useful for you: http://www.zubrag.com/scripts/download.php or : http://www.richnetapps.com/the-right-way-to-handle-file-downloads-in-php/