src/IniWriter.php
public function writeToFile($filename, $data, $header = '')
    {
        $ini = $this->writeToString($data, $header);
        if (!file_put_contents($filename, $ini))
            throw new IniWritingException(sprintf('Impossible to write to file %s', $filename));
    }
public function writeToFile($filename, $data, $header = '')
    {
        $ini = $this->writeToString($data, $header);
        if (!file_put_contents($filename, $ini))
            throw new IniWritingException(sprintf('Impossible to write to file %s', $filename));
    }
public function writeToFile ( $ filename , $ data , $ header = '' ) { $ ini = $ this -> writeToString ( $ data , $ header ) ; if ( ! file_put_contents ( $ filename , $ ini ) ) throw new IniWritingException ( sprintf ( 'Impossible to write to file %s' , $ filename ) ) ; }
Convert an array or an IniCollection to INI string in file.
@param string $filename
@param IniCollection|array $data
@param string $header Add header before INI content.
@throws IniWritingException
Convert an array or an IniCollection to INI string in file .