[Mapserver-users] Mapobj between severals php scripts

Stéphane RIFF stephane.riff at cerene.fr
Fri Jul 30 10:41:35 EDT 2004


In fact i want to use the same mapObj in two script. This two script are 
in two different frame
and i want to use the map object in the two script. I tested with php 
sessions but it doesn't work, i tried with $map->save('filename')
but this doesn't store the query result so i ask your advices

Hope this one is more explicit
Thanks

Merlos wrote:

>Your question is not very explicit. What do you mean with share? 
>
>Maybe you are not referring to this, but, in general, if you define a 
>variable in the "main"  function of a php script it is accessible in all 
>included scripts or using the global keyword in functions, but this is 
>something general on the php language, it is not a particularity of the 
>phpmapscript.
>
>
><?php
>//first.php
>...
>//Define the map as global
>$map = ms_newMapObj('mymap.map');
>....
>
>include ('second.php');
>
>?>
>
>
><?php
>//second.php
>
>function mydraw () {
>	global $map;
>              ...
>	$img= map->draw();
>      ...
>}
>...
>$ext = $map->getExtent();
>...
>mydraw();
>?>
>
>On Friday 30 July 2004 14:36, Stéphane RIFF wrote:
>  
>
>>Hello
>>
>>I want to know if it's possible to share a map object create with
>>phpmapscript between multiple script ???
>>
>>Thanks
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>    
>>
>
>  
>




More information about the mapserver-users mailing list