Page 1 sur 1

Pb code php (mapscript)

Posté : 01 sept. 2005, 16:32
par odyssee
Bonjour,

J'ai un pb avec l'écriture de mon script (mapscript). J'ai essayé plusieurs modifications mais sans résultat. Quelqu'un pourrait-il m'éclairer ?

Code : Tout sélectionner

$image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0) <img src=<?php echo "'http://localhost".$image_url."'width='".$map->width."px' height='".$map->height."px'";?>/>
Je ne peux pas afficher, via le navigateur, l'image créée car l'url généré par le code est faux.
Lorsque je vérifie l'adresse de l'image j'ai : "http://localhost 1125584135316061.png" au lieu de : " http://localhost/1125584135316061.png" (il manque un slash).

Merci d'avance

Posté : 01 sept. 2005, 16:34
par raptor
<img src="http://localhost/<?php echo $image_url;?>" width="<?php echo $map->width;?>px" height="<?php echo $map->height;?>px" />
et comme ca ?

Posté : 01 sept. 2005, 17:21
par odyssee
Cela ne marche toujours pas.

Lorsque je récupère l'adresse de l'image, j'ai : (un % en trop)

http://localhost/%201125588045311351.png

Posté : 01 sept. 2005, 17:23
par raptor
je ne sais pas d'ou il viens, je ne connais pas mapscript, mais explose le lol
<img src="http://localhost/<?php echo substr($image_url,1);?>" width="<?php echo $map->width;?>px" height="<?php echo $map->height;?>px" />
@+