Re: configured, now what?
Brought to you by:
iridium
From: Joel <jdl...@ei...> - 2004-06-04 21:07:42
|
Martin Geisler wrote: >Joel <jdl...@ei...> writes: > > > >>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"; >> >> > >That's almost correct --- PhpWeather 2.x seperates the output >functionality from the METAR parsing functionality. You must >therefore make an object to make the output: > > require_once(PHPWEATHER_BASE_DIR . '/output/pw_text_en.php'); > $text = new pw_text_en($weather); > $text->print_pretty(); > >That should do the trick. > > > Yep, got that after more scowling at test.php. I suspect I can figure out the icons with a little more scrutiny. As a suggestion, you may want to include a quick example.php (say) in the package that shows the proper includes and code to use to print the data from your defaults.php settings. test.php was a little confusing to me with getting the $metar from the form instead of defaults.php, etc. But, maybe that's just me. Thanks for your quick reply, Joel |