formfields
Joined: 01 Aug 2005 Posts: 465
|
Posted: Tue Jun 05, 2007 7:20 pm Post subject: Call to undefined function: file_get_contents() |
|
|
This error occurs when you use FORMfields with an early version of PHP 4, < PHP 4.3. To fix this, just paste the following code after the first "<?php" tag in your FORMfields.php file:
| Code: |
if (!function_exists("file_get_contents")) {
/**
* Reads entire file into a string
* This function is not available in early versions of PHP 4 and it is used by FORMfields, therefore it is implemented in FORMfields.
* @see file_get_contents
* @since FORMfields v3.0
*/
function file_get_contents($filename)
{
return implode('', file($filename));
}
}
|
|
|