[mapguide-users] Re: Help Need in PHP and MGOS 2.1

padmini godavarthi godavarthi.padmini at gmail.com
Sun Mar 7 12:53:56 EST 2010


Hi,
Thanks for ur reply. i have initialized the webserver extensions but of no
use...........

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--
//  Copyright (C) 2004-2009 by Autodesk, Inc.
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of version 2.1 of the GNU Lesser
//  General Public License as published by the Free Software Foundation.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
USA
-->

<html>
<head>
</head>
<body>
<input type="text" name="id" size="15">
<input type="button" name="button" value="Click" size="10">
<?php

$webExtensionsDirectory = 'C:\Program Files\OSGeo\MapGuide\Web\\';
$MapGuideServerDirectory = 'C:\Program Files\OSGeo\MapGuide\Server\\';
$viewerFilesDirectory = $webExtensionsDirectory . 'www\viewerfiles\\';
$schemaDirectory = $MapGuideServerDirectory . 'Schema\\';
$webconfigDirectory = $webExtensionsDirectory . 'www\\';

$webconfigFilePath = $webconfigDirectory . 'webconfig.ini';
echo $webconfigDirectory;
$args =  ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
MgInitializeWebTier($webconfigFilePath);
     $sessionId = $args['SESSION'];

     $mapName = $args['MAPNAME'];

      $userInfo = new MgUserInformation($sessionId);
      $siteConnection = new MgSiteConnection();
     $siteConnection->Open($userInfo);

$resourceService
=$siteConnection->CreateService(MgServiceType::ResourceService);
$featureService
=$siteConnection->CreateService(MgServiceType::FeatureService);

echo "hiiiiiiii";
   ?>
</body>
</html> 

for testing purpose i just want to display "Hiiii" after creating
services.but it was not displaying.....
plz tell me the  solution.iam really new to this php...............
1) and how to call this php page from button click..plz send me the sample
code...........

Regards,
Padmini G.

-- 
View this message in context: http://n2.nabble.com/Help-Need-in-PHP-and-MGOS-2-1-tp4686590p4691287.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list