protected function open($filename, $flags)
    {
        if (is_file($filename) === false || ($this->file = fopen($filename, $flags)) === false) {
            throw new Exception('Unable to open the target file.');
        }
    }
protected function open($filename, $flags)
    {
        if (is_file($filename) === false || ($this->file = fopen($filename, $flags)) === false) {
            throw new Exception('Unable to open the target file.');
        }
    }
protected function open ( $ filename , $ flags ) { if ( is_file ( $ filename ) === false || ( $ this -> file = fopen ( $ filename , $ flags ) ) === false ) { throw new Exception ( 'Unable to open the target file.' ) ; } }
Opens a file for writing.

@param  string $filename The filename
@param  string $flags    Flags
@throws Exception
Opens a file for writing .