[eluser]richzilla[/eluser]
Hi all, im having a little bit of a problem getting to grips with the file helper. Im trying to get it to write to a log file so i can see when users have logged into my application, made changes etc etc. However, although i seem to have loaded everything correctly, it is making no effort to write to the file. Ive checked file an folder permissions all the way back to my root folder and there all good, but when i use the get_filenames method, it cant find it either.
My code is:
i set the data to be written here:
Code:
$this->write_log(unix_to_human(now()).': USER: '.$this->session->userdata('userid').' Logged In');
and the method being called
Code:
function write_log($data)
{
write_file(base_url().'assets/log/main_log.txt',$data);
}
i appreciate i could be missing something simple, so if anyone can point me in the correct direction, i would appreciate it.
Cheers