[mapserver-users] help
Attila Borbás
attila.borbas at gmail.com
Tue Nov 18 13:52:39 PST 2008
Hello,
I ve got a big problem with php/mapscript.I ve tried a simple "hello world"
example (from Beginning MapServer Open Source GIS Development) and I didn't
get any error message, but the browser couldn't generate the rendered pic. I
don't know what the problem could be, but all codes what I ve made had the
same problem. I attached the bad codes. Thx for ur help and I'm looking
forward to your answer.
*The php/mapscript file:*
<?php
dl('php_mapscript.dll');
$image_name = sprintf("phpms-hello%0.6d",rand(0,999999)).".png";
$map = ms_newMapObj("c:/ms4w/Apache/htdocs/hello_world/hello.map");
$image=$map->draw();
$image->saveImage("c:/ms4w/tmp/ms_tmp/".$image_name);
?>
<html>
<head><title>PHP MapScript Hello World</title></head>
<body>
<form action="hello.php" method="POST">
<input type="image" name="img"
src="c:/ms4w/tmp/ms_tmp/<?php echo $image_name; ?>">
</form>
</body>
</html>
*The map file:*
# "Hello World" mapfile
NAME "Hello World"
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.0 -1.0 1.0 1.0
WEB
IMAGEPATH "c:/ms4w/tmp/ms_tmp/tmp/"
IMAGEURL "/tmp/"
END
LAYER
STATUS default
TYPE point
FEATURE
POINTS 0.00 0.00 END
TEXT "Hello World"
END # end feature
CLASS
STYLE
COLOR 255 0 0
END
LABEL
TYPE bitmap
END
END
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081118/53df3418/attachment.htm>
More information about the MapServer-users
mailing list