Okay, the idea is that when the coder (me or someone else) registers a file, the Template reads in the contents of the selected file, turns it into a string, and then saves it in an array. However, the array refuses to take the string. Instead, it just takes the first character. Here's the code I'm using:
function register_file($file_id, $file_name)
{
$fh = fopen($file_name, "r") or die("Couldn't open $file_name!");
$file_contents = file($file_name);
$string = implode($file_contents, "");
$this->file[$file_id] = $string;
fclose($fh);
}
What's wrong with it?