-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Hello I'm making a module for a opensource ERP using zklibrary . So using this module how use that ERP could get data from it directly to the ERP DB.
I made button for connect and disconnect devices, and I want to get some Success Message or Error Messages if I try to connect or disconnect devices.
I could do it with Connect Button Using this lines.
`<?php
require 'zklibrary.php';
$zk = new ZKLibrary($ipdevice, $port);
$zk->connect();
if($zk == TRUE){
echo "Device Connected";
}
else
{
echo "Error : Can't connect to this device";
}
$zk->disableDevice();
?>
`
Then I have other buttons to getUsers and getAttendance.
But when I want to disconnect the device using this lines I can't get the message "Device was disconnected"
`<?php
require 'zklibrary.php';
$zk->enableDevice();
$zk->disconnect();
if($zk == TRUE){
echo "Device was disconnected";
}
else
{
echo "Device was already disconnected / There's no device connected / Device couldn't disconnected";
}
?>
`
any ideas?