>From a user's standpoint, PostgreSQL (and PostGIS) does not write files. In order to read/write files, you need tools (psql, pgAdminIII, pgsql2shp, etc.). You need to write a custom tool for your situation in PHP.
Ignoring details, you will need a database connection from PHP to PostgreSQL, run your query, and put the text result into PHP. Once PHP has this data, you can open a file in write mode and write the lines to the file. -Mike On 19 October 2010 04:37, zhang zhe <luckycl...@hotmail.com> wrote: > Hello, > > Does anyone knows how to generate xml file from postgres table. > > select table_to_xml(‘building3’,true,true,’’); > > will print xml file in data output . How can I generate a file, and save it > to directory automatically. I want to write this function in php code. > > > > Thank you very much. > > > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users