Browse Source

- Return number of bytes written instead of just TRUE. (Path by Paul Hudson,

hudzilla@php.net)
PEAR_1_4DEV
Derick Rethans 23 years ago
parent
commit
f2acb42223
  1. 6
      ext/standard/file.c

6
ext/standard/file.c

@ -474,8 +474,8 @@ PHP_FUNCTION(file_get_contents)
}
/* }}} */
/* {{{ proto string file_put_contents(string file, string data[, int flags[, resource context]])
Write/Create a file with contents data */
/* {{{ proto int file_put_contents(string file, string data[, int flags[, resource context]])
Write/Create a file with contents data and returns the number */
PHP_FUNCTION(file_put_contents)
{
php_stream *stream;
@ -506,7 +506,7 @@ PHP_FUNCTION(file_put_contents)
}
php_stream_close(stream);
RETURN_TRUE;
RETURN_LONG(numbytes);
}
/* }}} */

Loading…
Cancel
Save