mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
_wfile readability
This commit is contained in:
@@ -1062,6 +1062,8 @@ class parseCSV {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write to local file
|
* Write to local file
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
* @param file local filename
|
* @param file local filename
|
||||||
* @param string data to write to file
|
* @param string data to write to file
|
||||||
* @param mode fopen() mode
|
* @param mode fopen() mode
|
||||||
@@ -1071,13 +1073,15 @@ class parseCSV {
|
|||||||
function _wfile ($file, $string = '', $mode = 'wb', $lock = 2) {
|
function _wfile ($file, $string = '', $mode = 'wb', $lock = 2) {
|
||||||
if ( $fp = fopen($file, $mode) ) {
|
if ( $fp = fopen($file, $mode) ) {
|
||||||
flock($fp, $lock);
|
flock($fp, $lock);
|
||||||
$re = fwrite($fp, $string);
|
$re = fwrite($fp, $string);
|
||||||
$re2 = fclose($fp);
|
$re2 = fclose($fp);
|
||||||
if ( $re != false && $re2 != false ) return true;
|
if ( $re != false && $re2 != false ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user