php function write_log in file