configured, now what?
Brought to you by:
iridium
From: Joel <jdl...@ei...> - 2004-06-04 17:39:08
|
I ran make_config.php and created defaults.php, and ran make_db.php and verified the tables were created properly. How do I print out the pretty output? In my old (1.58) version, I put this in a php file and it worked fine (albeit slowly): include('phpweather/locale_en.inc'); include('phpweather/phpweather.inc'); $metar = get_metar('KMIC'); $data = process_metar($metar); $temp_c = $data['temp_c']; $temp_f = $data['temp_f']; echo "<h3>The temperature is $temp_f degrees F at Crystal Airport</h3>"; pretty_print_metar($metar, 'Crystal Airport, MN'); With 2.2.1, I tried: include ('./phpweather.php'); $weather = new phpweather(); $data = $weather->decode_metar(); echo "<p>\n" . $weather->print_pretty() . "</p>\n"; echo "<pre>\n"; print_r($data); echo "</pre>\n"; The raw data prints out ok, but if I use print_pretty() (which I saw in test.php) I get *Fatal error*: Call to undefined function: print_pretty() in */opt/apache/share/htdocs/phpweather-2.2.1/kmic.php* on line *6 *I know I'm missing something obvious, but I've been through the docs and couldn't find an example (except for the raw printout). Thanks, Joel |