|
Posted by David Wahler on 01/25/06 18:59
Ubantu Rococo wrote:
> Thanks mate.
> I've tried it, but the getWorldMap() function doesn't seem to work! I either
> get the raw binary data of the jpg
> and an error about the header (if I leave the header(...) function in
> below), or just the raw data if I leave out the f
> function.
[snip]
Are you trying to do this?
<html>
<h1>Test...</h1>
<?php
include("getWorldMap.php");
$wm = getWorldMap();
imagejpg($wm);
?>
</h1>
As Dave already explained, this won't work. Here's what you can do:
move the call to imagejpg() into getWorldMap.php, and then move the
image generation code out of the getWorldMap() function and into the
top level of getWorldMap.php. Then, in your main page, do something
like this:
<html>
<h1>Test...</h1>
<img src="getWorldMap.php">
</html>
-- David
[Back to original message]
|