Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect function message #125

Open
jmaxb2691 opened this issue Jan 12, 2023 · 0 comments
Open

Disconnect function message #125

jmaxb2691 opened this issue Jan 12, 2023 · 0 comments

Comments

@jmaxb2691
Copy link

jmaxb2691 commented Jan 12, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant