mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- added compatibility function file_put_contents
git-svn-id: http://piwigo.org/svn/trunk@2215 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -125,6 +125,7 @@ foreach( array(
|
||||
'array_intersect_key', //PHP 5 >= 5.1.0RC1
|
||||
'hash_hmac', //(hash) - enabled by default as of PHP 5.1.2
|
||||
'preg_last_error', // PHP 5 >= 5.2.0
|
||||
'file_put_contents', //PHP5
|
||||
) as $func)
|
||||
{
|
||||
if (!function_exists($func))
|
||||
|
||||
@@ -46,7 +46,7 @@ function get_root_url()
|
||||
}
|
||||
else
|
||||
{
|
||||
return substr($root_url, 2);
|
||||
return (string)substr($root_url, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
//php 5
|
||||
function file_put_contents($filename, $data)
|
||||
{
|
||||
$fp = fopen($filename, 'w');
|
||||
if ($fp)
|
||||
{
|
||||
$ret = fwrite($fp, $data);
|
||||
fclose($fp);
|
||||
return $ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user