Log/file.php
function open()
    {
        if (!$this->_opened) {
            /* If the log file's directory doesn't exist, create it. */
            if (!is_dir(dirname($this->_filename))) {
                $this->_mkpath($this->_filename, $this->_dirmode);
            }

            /* Determine whether the log file needs to be created. */
            $creating = !file_exists($this->_filename);

            /* Obtain a handle to the log file. */
            $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');

            /* We consider the file "opened" if we have a valid file pointer. */
            $this->_opened = ($this->_fp !== false);

            /* Attempt to set the file's permissions if we just created it. */
            if ($creating && $this->_opened) {
                chmod($this->_filename, $this->_mode);
            }
        }

        return $this->_opened;
    }
function open()
    {
        if (!$this->_opened) {
            /* If the log file's directory doesn't exist, create it. */
            if (!is_dir(dirname($this->_filename))) {
                $this->_mkpath($this->_filename, $this->_dirmode);
            }

            /* Determine whether the log file needs to be created. */
            $creating = !file_exists($this->_filename);

            /* Obtain a handle to the log file. */
            $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');

            /* We consider the file "opened" if we have a valid file pointer. */
            $this->_opened = ($this->_fp !== false);

            /* Attempt to set the file's permissions if we just created it. */
            if ($creating && $this->_opened) {
                chmod($this->_filename, $this->_mode);
            }
        }

        return $this->_opened;
    }
function open ( ) { if ( ! $ this -> _opened ) { /* If the log file's directory doesn't exist, create it. */ if ( ! is_dir ( dirname ( $ this -> _filename ) ) ) { $ this -> _mkpath ( $ this -> _filename , $ this -> _dirmode ) ; } /* Determine whether the log file needs to be created. */ $ creating = ! file_exists ( $ this -> _filename ) ; /* Obtain a handle to the log file. */ $ this -> _fp = fopen ( $ this -> _filename , ( $ this -> _append ) ? 'a' : 'w' ) ; /* We consider the file "opened" if we have a valid file pointer. */ $ this -> _opened = ( $ this -> _fp !== false ) ; /* Attempt to set the file's permissions if we just created it. */ if ( $ creating && $ this -> _opened ) { chmod ( $ this -> _filename , $ this -> _mode ) ; } } return $ this -> _opened ; }
Opens the log file for output.  If the specified log file does not
already exist, it will be created.  By default, new log entries are
appended to the end of the log file.

This is implicitly called by log(), if necessary.

@access public
Opens the log file for output . If the specified log file does not already exist it will be created . By default new log entries are appended to the end of the log file .