[Mapserver-users] Mapobj between severals php scripts

Merlos merlos at tsc.uvigo.es
Fri Jul 30 11:57:59 EDT 2004


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

-- 
--
http://www.merlos.biz



More information about the mapserver-users mailing list