Re: [PHP] Re: fwrite/fclose troubles

2008-03-22 Thread Mark Weaver
Dave Goodchild wrote: Why are you writing a logging class? Why not use error_log and enable error logging? two reasons actually, 1. learning OOP for PHP, so the more I practice at it the better I get. 2. the logging that's being done with this class is done primarily for debugging during

Re: [PHP] Re: fwrite/fclose troubles

2008-03-22 Thread Mark Weaver
Al wrote: int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] ) This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. This native function does it for you Very nice! I wasn't aware of this one.

[PHP] Re: fwrite/fclose troubles

2008-03-22 Thread Al
Seems like this does what you are attempting. if(DEBUG_MODE) // TRUE for debug only { ini_set(display_errors, on); //use off if users will see them error_reporting(E_ALL); echo 'span style=color:redError display and logging on/span '; } Mark Weaver wrote: Hi all, I've been

Re: [PHP] Re: fwrite/fclose troubles

2008-03-22 Thread Mark Weaver
Al wrote: Seems like this does what you are attempting. if(DEBUG_MODE) // TRUE for debug only { ini_set(display_errors, on); //use off if users will see them error_reporting(E_ALL); echo 'span style=color:redError display and logging on/span '; } If I understand this correctly

[PHP] Re: fwrite/fclose troubles

2008-03-21 Thread Al
int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] ) This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. This native function does it for you Mark Weaver wrote: Hi all, I've been lurking and

Re: [PHP] Re: fwrite/fclose troubles

2008-03-21 Thread Dave Goodchild
Why are you writing a logging class? Why not use error_log and enable error logging? On Fri, Mar 21, 2008 at 1:11 PM, Al [EMAIL PROTECTED] wrote: int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] ) This function is identical to calling fopen(),

Re: [PHP] Re: fwrite/fclose troubles

2008-03-21 Thread Thijs Lensselink
Quoting Dave Goodchild [EMAIL PROTECTED]: Why are you writing a logging class? Why not use error_log and enable error logging? Maybe he wants to log user actions in an application? Can log so much more then just errors. But the answer to this problem was already given. :) On Fri, Mar

[PHP] Re: fwrite/fclose troubles

2008-03-20 Thread Peter Ford
Mark Weaver wrote: Hi all, I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only serves a singular

Re: [PHP] Re: fwrite/fclose troubles

2008-03-20 Thread Mark Weaver
Peter Ford wrote: Mark Weaver wrote: Hi all, I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only