Welcome Guest, Not a member yet? Register   Sign In
File helper... not helping
#1

[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


Messages In This Thread
File helper... not helping - by El Forum - 10-05-2009, 08:57 AM
File helper... not helping - by El Forum - 10-05-2009, 09:02 AM
File helper... not helping - by El Forum - 10-05-2009, 09:25 AM
File helper... not helping - by El Forum - 10-05-2009, 09:36 AM
File helper... not helping - by El Forum - 10-05-2009, 01:08 PM
File helper... not helping - by El Forum - 10-05-2009, 07:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB