PDA

View Full Version : Call to undefined function: file_get_contents()


Christian
02-18-2005, 01:38 AM
When attemtping to open installer I get the following error:
" Fatal error: Call to undefined function: file_get_contents() in /var/www/word/installer/installer.php on line 4 "

I have followed the given instructions, but couldn't install the site.

My server is Linux loki 2.4.25 and the softare I use is Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 .

Support
02-19-2005, 03:02 AM
Function file_get_contents() is supported in later versions of PHP. We strongly advise upgrading PHP to 4.3.10 on your server due to various security issues.

Alex
05-04-2005, 06:35 PM
For all those having file_get_contents() problem with older PHP versions, there is a solution on PHP website: http://www.php.net/manual/en/function.file-get-contents.php


if(!function_exists('file_get_contents')) {
function file_get_contents($file) {
$file = file($file);
return !$file ? false : implode('', $file);
}
}

vampireman
01-29-2007, 04:42 PM
how i can use it in my site ????
pls confirm me
:confused: :confused: :confused: :confused:

shketuljko
01-30-2007, 12:10 PM
It's possible if you upgrade your php version on 4.3 or later.