diff --git a/boost.helpers.inc b/boost.helpers.inc index ebe67f8885d6ee91cd14cba32fd5a33ae3667d07..40085adbe9251f2a818ebb71b25584f6c48b82b9 100644 --- a/boost.helpers.inc +++ b/boost.helpers.inc @@ -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; + } +} + +//////////////////////////////////////////////////////////////////////////////