Skip to content

Disconnect function message #125

@jmaxb2691

Description

@jmaxb2691

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions