[ 3emyh @ 19.09.2005. 20:46 ] @
U sledecem programu:

<?php
function openSav($ime)
{
$api = new win32;
$api->registerfunction("long spssOpenRead (string &pszPathName, int &hSPSSFile) From spssio32.dll");
$hendl=0;
$fajl=$ime;
$rez=$api->spssOpenRead($fajl, $hendl);
if($rez==0)
return $hendl;
die("Ne mogu da otvorim fajl: $ime");
}
function readData($hendl)
{
$api = new win32;
$api->registerfunction("long spssGetNumberofVariables (int hF, int &nVar) From spssio32.dll");
$fh=$hendl;
$nofv=0;
$rez=$api->spssGetNumberofVariables($fh, $nofv);
if($rez==0)
return $nofv;
die("Greska");
}
function closeData($hendl)
{
$api = new win32;
$api->registerfunction("long spssCloseRead (int hF) From spssio32.dll");
$rez=$api->spssCloseRead($hendl);
if($rez==0)
return true;
die("Freska");
}
$hendl=openSav(getcwd()."\\podaci.sav");
print readData($hendl);
closeData($hendl);
?>

na closeData uvek dobijam :Call to undefined function: registerfunction()
i tako uvek kad pokusam da registrujem 3. funkciju. U cemu je fora?