Örnek kodlarınızı iletirseniz daha iyi yardımcı olabiliriz.
Merhaba
$type = "file";
$file = "giriskayitlari.txt";
if(!empty($type) && $type == "file") {
if(is_writable($file)) {
$fh = fopen($file, 'a');
if(filesize($file) < 32) {
fwrite($fh, " LOG KAYITLARI ".$file."\n");
fwrite($fh, "|---------------------\n");
}
fwrite($fh, '| Time: '.$date->format('Y-m-d H:i:s')."\n");
fwrite($fh, '| HTTP Referer: '."".$href ."\n");
fwrite($fh, '| Region: '."".$regionName ."\n");
fwrite($fh, '| City: '."".$city ."\n");
fwrite($fh, "|---------------------\n");
fclose($fh);
} else {
chmod($file, 0777);
die("<pre>Content could not load.\n");
die("If you are the owner of this site, please adjust file permissions to allow writing to the file specified in config.</pre>");
}
}Bu şekilde düşünebiliriz işlemi.