When squeaking out of the console doesn't write in the file.



  • Why, when I start a php crypt out of the console, doesn't write a file, and a browser writes?

    $time = date("Y-m-d H:i:s");
    $logFileName = "log_price.log";
    $fp = fopen($logFileName,'a');
    $message = $time." | New records: ".$x." | Deleted records: ".$y." | Changed records :".$z." | Elapsed time: ".substr(($time_end - $time_start),0,8)." s. | Processed: ".($x+$y+$z)." str.\r\n";
    fputs($fp, $message);
    fclose($fp);
    


  • Check which one of the users owns this file and access rights.

    Most often, this problem arises because what works in the browser is performed under one user and in the console under another.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2