Jesus Loves GRASS

Technical blog about GRASS/GIS,open source geoinformatics and MAPSERVER.

Thursday, July 30, 2009

white space fore php tag

While a blank line before the <?php start tag may look innocent, when processed by PHP, it will turn into an echo statement printing out a blank line.

If working with web service wrapper scripts from mapserver this could be a disaster resulting in some strange behaviours like:

1) After $request->loadparams(); the script will send you an empty file as a reply
2) If the $request has uses setparameters, all the outputs will be dumped to the browser window, for example a WMS GetMap request will be a binary string in the browser window.
3) The ms_iogetStdoutBufferBytes(); will return nothing if you want to save the image locally.
4) Output with Warning: Cannot modify header information - headers already sent by

These symptoms are caused by the existence of an open buffer cause by the blank line, at the begining of the php programming.

Labels: , ,

1 Comments:

At 16/1/12 3:37 AM, Anonymous Anonymous said...

The Tory Burch Boots since extrusion, has obtained unprecedented successful and the widespread support, the short two weeks, on-line click rate crossed 1,000,000 people. Reputation striking international level shoes shoe brand designer Stuart Weitzman also pays attention to this charitable activity. Stuart the Weitzman expression appreciation "glitters 7X1" charitable project inspiration goddess Miss Li Jiaxin, thought that her makings graceful have the benevolence Tory Burch Flats.
In addition, Stuart Weitzman praises Shi Hualuo the world singular element to create and in art unceasing searches newly, the stimulation infinite inspiration, has been the international apex designers' creation first choice, oneself also frequently use the crystal element design shoes shoe, but this time is practiced by the brand the community responsibility the spirit to be moved positively, therefore uses thousand sparkle gorgeous Tory Burch Sandals the Luo river world singular element to make a pair of unique crystal shoes donate brand, makes charitable auction. Shi Hualuo the world singular element stimulates the infinite creativity Since 1895, Shi Hualuo the world singular element continuously in the crystal element domain for designer's first choice, and has had 116 Year radiant history which creates hand in hand with the international apex Tory Burch Flip Flops.

 

Post a Comment

<< Home