PHP code example of myphps / taos-rest
1. Go to this page and download the library: Download myphps/taos-rest 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/ */
myphps / taos-rest example snippets
t = '127.0.0.1:6041';
$user = 'root';
$pwd = 'taosdata';
$taos = new \TDEngine\TaosRestApi($host, $user, $pwd, 'test');
$taos->exec('SHOW TABLES');
echo json_encode($taos->fetch()).PHP_EOL;
echo json_encode($taos->query('SHOW TABLES')).PHP_EOL;