1if (version_compare(PHP_VERSION, '5.3.0', '<')) {
2 set_magic_quotes_runtime(0);
3}
4else {
5 ini_set('magic_quotes_runtime', 0);
6}
7$magic_quotes = get_magic_quotes_runtime();
8$file_buffer = fread($fd, filesize($path));
9$file_buffer = $this->EncodeString($file_buffer, $encoding);
10fclose($fd);
11if ($magic_quotes) {
12 if (version_compare(PHP_VERSION, '5.3.0', '<')) {
13 set_magic_quotes_runtime($magic_quotes);
14 }
15 else {
16 ini_set('magic_quotes_runtime', $magic_quotes);
17 }
18}
19
20return $file_buffer;
21