I have some file has upload to server. I want detect some this file to be access or not. if it access will write to access log. I has use
$_SERVER['HTTP_REFERER'];
but it only detect access site, not file. My question: How to detect file access.
I have some file has upload to server. I want detect some this file to be access or not. if it access will write to access log. I has use
$_SERVER['HTTP_REFERER'];
but it only detect access site, not file. My question: How to detect file access.
If the file has been accessed over HTTP, and not excluded from logging somehow, then the access will be recorded in the access.log without need for any intervention from PHP.
So… do nothing.