Commit 71f6f6f8 authored by Arto's avatar Arto

Added file_put_contents() implementation for PHP4 (fixes #100576; with thanks...

Added file_put_contents() implementation for PHP4 (fixes #100576; with thanks to Rizqinofa Putra M).
parent ea6683e2
......@@ -81,3 +81,17 @@ function _boost_symlink($target, $link) {
}
//////////////////////////////////////////////////////////////////////////////
// PHP4 COMPATIBILITY
if (!function_exists('file_put_contents')) {
function file_put_contents($filename, $data) {
if ($fp = fopen($filename, 'wb')) {
fwrite($fp, $data);
fclose($fp);
return filesize($filename);
}
return FALSE;
}
}
//////////////////////////////////////////////////////////////////////////////
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment