ArnisR Posted November 13, 2011 Report Share Posted November 13, 2011 (edited) Kādā veidā var panākt, lai, atverot failu lapa.lv/data.txt, lietotājs nevarētu piekļūt faila saturam, savukārt ar php šo failu varētu lasīt? Edited November 13, 2011 by ArnisR Quote Link to comment Share on other sites More sharing options...
codez Posted November 13, 2011 Report Share Posted November 13, 2011 pats vieglākais un visefektīvākais veids ir nelikt .txt failu web folderī un piekļūt ar ../private/data.txt Piemēram, tev ir mapes: /public /private /public ir web folderis, kurā ir tikai tie faili, kuriem reāli jāpiekļūst /private savukārt nav web folderis un neviens šiem failiem nevar caur webserveri piekļūt, bet php var. Quote Link to comment Share on other sites More sharing options...
briedis Posted November 13, 2011 Report Share Posted November 13, 2011 Otrs variants, ielikt atsevišķā mapē to failu, un pievienot .htaccess failu, ar saturu: Deny From All Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.