[mapserver-users] About shapefile generation in PHP with DBF

Daniel Morissette dmorissette at mapgears.com
Fri Aug 6 14:48:11 EDT 2010


Cristiano Sumariva wrote:
> I took a look at documentation in PHP mapscript but did not find a way
> to create the .dbf file.
> Do mapserver classes has support for generating attribute .dbf file?
> If not any sugestion for an ready to use tool that I can use?
> For database export one option I found  was to call pgsql2shp with a
> prepared query but must have exec function enabled to do this.
> 

PHP MapScript doesn't provide any functions to deal with DBF files. This
is left to the PHP xbase module:

http://php.net/manual/en/book.dbase.php

Unfortunately I don't think the xbase module is included in default PHP
builds that you get from php.net and Linux distros any more. I believe
the FGS, MS4W and MapServer related binary distributions still provide
it but could be wrong, you'll have to check.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list