parseCSV::_wfile PHP Method

_wfile() public method

Write to local file
public _wfile ( $file, $string = '', $mode = 'wb', $lock = 2 ) : true
return true or false
    function _wfile($file, $string = '', $mode = 'wb', $lock = 2)
    {
        if ($fp = fopen($file, $mode)) {
            flock($fp, $lock);
            $re = fwrite($fp, $string);
            $re2 = fclose($fp);
            if ($re != false && $re2 != false) {
                return true;
            }
        }
        return false;
    }