|
|
#1 |
|
New Member
![]() Join Date: Sep 2011
Posts: 4
|
Hello,
I would like to be able to read a flat file with php (via fopen and fgets), but not allow viewers to access the file itself (by visiting www.website.com/flat_file). I have not been able to get this working properly with file permissions. Is there another (efficient) way to accomplish this? |
|
|
|
|
|
#3 |
|
Bronze Member
![]() |
I have nothing to add. DesignerBill has covered the topic and provided the best answer. I merely confirm that using .htaccess is the best solution here.
__________________
Nicolas Bouliane Web designer/developer in Granby, Québec |
|
|
|
|
|
#4 |
|
Silver Member
![]() Join Date: Aug 2011
Posts: 100
|
Another solution is to store it outside the web directory. For example store it in the directory above where you put the rest of your website.
__________________
Mark R Wubbleyou - Web Design Newcastle A professional web design agency based in Newcastle upon Tyne servicing clients based throughout the U.K. Home spray tan machine - Landlord Reviews |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|