[FX.php List] Connectivity of PHP 5.0.x/4.3.9 with fx.php 3.0
Anchal Jain
anchalj at mindfiresolutions.com
Mon Nov 22 06:36:07 MST 2004
Hi All,
I am not able to get connectivity of filemaker7 with PHP 5.0/4.3.9.I am using the following simple code:-
<?php
if( !isset($_SERVER['PATH_TRANSLATED']) )
{
if(isset($_SERVER['SCRIPT_FILENAME']))
$_SERVER['PATH_TRANSLATED'] =$_SERVER['SCRIPT_FILENAME'];
else
$_SERVER['PATH_TRANSLATED'] =realpath('install.php');
}
if (! isset($_SERVER['DOCUMENT_ROOT'])) {
global $DOCUMENT_ROOT;
global $HTTP_SERVER_VARS;
$_SERVER['DOCUMENT_ROOT'] = str_replace(str_replace('\\\\', '/', $_SERVER['PHP_SELF']), '', str_replace('\\\\', '/', $_SERVER['PATH_TRANSLATED'])) . '/';
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
}
include_once("/inetpub/wwwroot/FX7/FX.php");
include_once("/inetpub/wwwroot/FX7/server_data.php");
$serverIPAddress = '127.0.0.1';
$currentDatabase = 'Tester.fp7';
$InstanceName = new FX($serverIPAddress,'80','FMPro7');
$InstanceName->SetDBData($currentDatabase);
$ReturnedData = $InstanceName->FMLayoutNames();
echo "<b>Layouts in $currentDatabase </b><br />\n";
foreach ($ReturnedData['data'] as $value) {
echo $value['LAYOUT_NAME'][0];
}
?>
With this code the get the following error message:-
Warning: Cannot use a scalar value as an array in C:\Inetpub\wwwroot\Buddysys\test\test5.php on line 33
Warning: Invalid argument supplied for foreach() in C:\Inetpub\wwwroot\Buddysys\test\test5.php on line 33
Any help would be appreciated.
Regards,
Anchal Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041122/21bcfc26/attachment.html
More information about the FX.php_List
mailing list