[mapserver-users] Echo PHP in a query template?

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Sun Oct 7 10:11:12 PDT 2012


Definitely not something done in MapServer proper. However, I thought with Apache you could do some process chaining/filtering. You might look at the various Apache modules (mod_filter is one) and see if there's anything there.

Steve

________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] on behalf of Brent Fraser [bfraser at geoanalytic.com]
Sent: Friday, October 05, 2012 9:15 PM
To: Bistrais, Bob
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Echo PHP in a query template?

Bob,
Not as coded.  The template file is read by mapserver, it then makes text substitutions (eg "[username]") , and sends the result to std out.  Then the web server sends it to the browser.  The web server does not do any interpreting of the PHP in this case.

What  did you want to do?

Best Regards,
Brent Fraser

On 10/5/2012 1:32 PM, Bistrais, Bob wrote:
I am customizing a MapServer query template.  I’d like to echo back some PHP  code in the HTML template.  But the process seems to ignore the PHP part.  Here’s a code example:

<!-- MapServer Template -->
<?
$test = "php test!";                         <----Set PHP variable
?>

<table>
<td align="left"><b>Your Name:</b></td></tr>
<tr>
<td><input type="text" id="username" value="[username]"/></td>
</tr>

<h3><? echo "test" ?></h3>                      <---Call PHP variable

</table>

-The PHP echo displays nothing

Is there a way to get this to work?

Thanks,
Bob Bistrais, GISP
Maine Office of Geographic Information Systems



_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121007/2e16a2ae/attachment.htm>


More information about the MapServer-users mailing list