⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rta_tables.php

📁 Linux嵌入式设计配套光盘,学习嵌入式设计可参考
💻 PHP
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"><html><head><title>RTA Table Editor</title></head><body><center><h3>RTA Table Editor</h3></center><?php    // Suppress Postgres error messages    error_reporting(error_reporting() & 0xFFFD);    // The user has selected a port for RTA access.  This is usually    // unique to the RTA application.    $port = htmlentities($_GET['port']);    if (! $port)        $port = 8888;    // In case it is not specified in URL.    // connect to the database     $conn = pg_connect("localhost", "$port", "bsmith");    if ($conn == "") {         printf("%s%s%s", "Unable to connect to application.<br>",            "Please verify that the application is running and ",            "listening on port $port.<br>");        exit();    }    // Headings    print("<table border=3 cellpadding=4 align=center width=65%>\n");    print("<tr><th>Table Name</th><th>Description</th></tr>\n");    // execute query     $command = "SELECT name, help, nrows FROM rta_tables";    $result = pg_exec($conn, $command);    if ($result == "") {         print("<p><font color=\"red\" size=+1>SQL Command failed!</p>");        print("<p>Command: $command</p>\n");        exit();    }    for($row = 0; $row < pg_NumRows($result); $row++)    {        $tblname  = pg_result($result, $row, 0);        $tblhelp  = pg_result($result, $row, 1);        $tblrows  = pg_result($result, $row, 2);        print("<tr>\n<td><a href=rta_view.php?table=$tblname&offset=0");        print("&nrows=$tblrows&port=$port>$tblname</a></td>\n");        print("<td>$tblhelp</td></tr>\n");    }    print("</table>\n");    // free the result and close the connection     pg_freeresult($result);    pg_close($conn);?></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -