PHP Fopen konular sunucu ve komut satırında komut aynı komut dosyası çalışırken

0 Cevap

I have one small script which open and append csv and put some information. file name based on today's date. But problem is coming when i run script from server it created under apache user and when same script run as cron run as different user. This creates issues and giving me errors

izni reddi.

benim örnek kod

$handler = fopen($file, 'a+');
fwrite($handler, date('Y-md H:i:s') . "\n");
fclose($handler);

0 Cevap