-
Trying to write a log file but I get access denied
//logit start
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
//If it does, assume that PHP app is behind Cloudflare.
$quip = $_SERVER["HTTP_CF_CONNECTING_IP"];
} else{
//Otherwise, use REMOTE_ADDR.
$quip = $_SERVER['REMOTE_ADDR'];
}
$file = '/var/www/html/news/logitnotrealpath/logitnotrealname.txt';
$content = $quip.' '.$urladdress.'\n';
umask(0077);
file_put_contents($file, $content, FILE_APPEND);
//chmod($file, 0600);
//logitstop -