{
$this->initConnect(true);
list($tableName) = explode(' ', $tableName);
if (strpos($tableName, '.')) {
$tableName = str_replace('.', '`.`', $tableName);
}
$sql = 'SHOW COLUMNS FROM `' . $tableName . '`';
// 调试开始
$this->debug(true);
$pdo = $this->linkID->query($sql);
// 调试结束
$this->debug(false, $sql);
$result = $pdo->fetchAll(PDO::FETCH_ASSOC);
$info = [];
if ($result) {
foreach ($result as $key => $val) {
$val = array_change_key_case($val);
$info[$val['field']] = [
'name' => $val['field'],
route | product/product |
product_id | 185 |
tag | Robot |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | www.alsrobot.com |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.alsrobot.com |
SERVER_ADDR | 10.45.24.120 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.92.130.77 |
DOCUMENT_ROOT | /var/www/alsweb/public |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /var/www/alsweb/public |
SERVER_ADMIN | zy2016@foxmail.com |
SCRIPT_FILENAME | /var/www/alsweb/public/index.php |
REMOTE_PORT | 37160 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | route=product/product&product_id=185&tag=Robot |
REQUEST_URI | /index.php?route=product/product&product_id=185&tag=Robot |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711717619.154 |
REQUEST_TIME | 1711717619 |