Answer the question
In order to leave comments, you need to log in
How to put a password on a json file and how to get its data after admin authorization?
Let's say we have files in the json folder:
db.json, .htaccess
.htaccess
Options All -Indexes
<FilesMatch ".(json)$">
Order Allow,Deny
Deny from all
</FilesMatch>
Answer the question
In order to leave comments, you need to log in
In order not to attach "crutches" to your scripts, take the time to write scripts safely.
There are a lot of articles - well, start at least with this
habrahabr.ru/post/12067
PS.
If you didn't leave a "HOLE", then no one will be able to put a php script on your site!
Files (json, txt, js, css, html) are created so that the client part of the site (browser) has access to them. You can download and watch them.
I mean, anyone can put php in a folder?
You invented a bicycle, and now you want to invent a lock for it.
Give json by generating another php script and check sessions there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question