PHP code example of airmoi / filemaker
1. Go to this page and download the library: Download airmoi/filemaker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
airmoi / filemaker example snippets
use airmoi\FileMaker\FileMaker;
$fm = new FileMaker($database, $host, $username, $password, $options);
use airmoi\FileMaker\FileMaker;
use airmoi\FileMaker\FileMakerException;
'prevalidate' => true]);
try {
$command = $fm->newFindCommand('layout_name');
$records = $command->execute()->getRecords();
foreach($records as $record) {
echo $record->getField('fieldname');
...
}
}
catch (FileMakerException $e) {
echo 'An error occured ' . $e->getMessage() . ' - Code : ' . $e->getCode();
}