[mapguide-commits] r6373 -
sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Dec 29 04:09:40 EST 2011
Author: liuar
Date: 2011-12-29 01:09:40 -0800 (Thu, 29 Dec 2011)
New Revision: 6373
Modified:
sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php
Log:
On behalf of Mars Wu
For ticket: http://trac.osgeo.org/mapguide/ticket/1887
The php function tempnam() doesn't work on IIS... The returned value is nothing.
Then fix the problem in another more straight way:
$tempImage = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "mgo" . uniqid();
DIRECTORY_SEPARATOR is a php variable which will handle the path separator for Windows and Linux
Modified: sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php
===================================================================
--- sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php 2011-12-29 06:22:36 UTC (rev 6372)
+++ sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php 2011-12-29 09:09:40 UTC (rev 6373)
@@ -116,7 +116,7 @@
"PNG",
false);
- $tempImage = tempnam(sys_get_temp_dir(), "mgo");
+ $tempImage = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "mgo" . uniqid();
$mgReader->ToFile($tempImage);
$image = imagecreatefrompng($tempImage);
unlink($tempImage);
More information about the mapguide-commits
mailing list