public function append($content, $create = false)
    {

        if ($this->writeable !== true || empty($content)) return false;

        if (strpos($this->_option, 'a') === false) {
            // close open filepoint
            if (!empty($this->fp)) fclose($this->fp);
            // opens fp for writing with file lock
            $this->open_fp((is_bool($create) && $create === true ? 'a+' : 'a'));
        }

        if ($this->file_lock !== true && !$this->lock(LOCK_EX)) return false;

        // writes to file
        fputs($this->fp, $content, strlen($content));
        // releases lock
        $this->lock(LOCK_UN);

        return true;
    }
public function append($content, $create = false)
    {

        if ($this->writeable !== true || empty($content)) return false;

        if (strpos($this->_option, 'a') === false) {
            // close open filepoint
            if (!empty($this->fp)) fclose($this->fp);
            // opens fp for writing with file lock
            $this->open_fp((is_bool($create) && $create === true ? 'a+' : 'a'));
        }

        if ($this->file_lock !== true && !$this->lock(LOCK_EX)) return false;

        // writes to file
        fputs($this->fp, $content, strlen($content));
        // releases lock
        $this->lock(LOCK_UN);

        return true;
    }
public function append ( $ content , $ create = false ) { if ( $ this -> writeable !== true || empty ( $ content ) ) return false ; if ( strpos ( $ this -> _option , 'a' ) === false ) { // close open filepoint if ( ! empty ( $ this -> fp ) ) fclose ( $ this -> fp ) ; // opens fp for writing with file lock $ this -> open_fp ( ( is_bool ( $ create ) && $ create === true ? 'a+' : 'a' ) ) ; } if ( $ this -> file_lock !== true && ! $ this -> lock ( LOCK_EX ) ) return false ; // writes to file fputs ( $ this -> fp , $ content , strlen ( $ content ) ) ; // releases lock $ this -> lock ( LOCK_UN ) ; return true ; }
appends to a file based + create if wanted

@param $content string
@param $create  bool

@return bool
appends to a file based + create if wanted