Please bear with me -- I am comfortable in perl, not php.
I am trying to add weather.module with a Drupal 4.3.1 installation.
The weather.module fails because file_get_contents is not defined (though I have PHP 4.3.2, and file_get_contents is allegedly available in PHP 4 >= 4.3.0). So I added the following code, fished off the web somewhere:
function file_get_contents($filename, $use_include_path = 0) {
$file = @fopen($filename, "rb", $use_include_path);
if ($file) {
if ($fsize = @filesize($filename)) {
$data = fread($file, $fsize);
} else {
$data = ""; // just to be safe. Dunno, if this is really needed
while (!feof($file)) $data .= fread($file, 1024);
}
fclose($file);
}
return $data;
}
When I add this, the weather module displays an error that reads "unexpected t_string". However, it only flashes in the browser for about 500 msec, then is replaced by a drupal page. How can I get the error to hold still, or go to log page where I can read it at leisure?
Three questions:
1. What's wrong with the code?
2. How can I view the error without being a superhuman speed-reader?
3. Why, when I add pre /pre tags around the code above, does drupal reject my post because of "suspicious input data"?
Thanks!
Cheryl (migrating from ezpublish, and very grateful for a much more