object(Addons\Bookshell\Model\BookshellModel)#16 (22) { ["_auto":protected]=> array(2) { [0]=> array(4) { [0]=> string(11) "update_time" [1]=> string(4) "time" [2]=> int(3) [3]=> string(8) "function" } [1]=> array(4) { [0]=> string(7) "link_id" [1]=> string(7) "getLink" [2]=> int(3) [3]=> string(8) "callback" } } ["_validate":protected]=> array(2) { [0]=> array(3) { [0]=> string(5) "title" [1]=> string(7) "require" [2]=> string(6) "书名" } [1]=> array(6) { [0]=> string(5) "title" [1]=> string(0) "" [2]=> string(9) "书名!" [3]=> int(0) [4]=> string(6) "unique" [5]=> int(1) } } ["model"]=> array(5) { ["title"]=> string(6) "书架" ["template_add"]=> string(0) "" ["template_edit"]=> string(0) "" ["search_key"]=> string(0) "" ["extend"]=> int(1) } ["_fields"]=> array(6) { ["id"]=> array(6) { ["name"]=> string(2) "id" ["title"]=> string(2) "ID" ["type"]=> string(3) "num" ["remark"]=> string(0) "" ["is_show"]=> int(2) ["value"]=> int(0) } ["title"]=> array(7) { ["name"]=> string(5) "title" ["title"]=> string(6) "书名" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["author"]=> array(7) { ["name"]=> string(6) "author" ["title"]=> string(6) "作者" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["description"]=> array(7) { ["name"]=> string(11) "description" ["title"]=> string(6) "描述" ["type"]=> string(8) "textarea" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["link_id"]=> array(7) { ["name"]=> string(7) "link_id" ["title"]=> string(6) "外链" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(0) } ["cover_id"]=> array(7) { ["name"]=> string(8) "cover_id" ["title"]=> string(6) "封面" ["type"]=> string(7) "picture" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(0) } } ["db":protected]=> object(Think\Db\Driver\Mysqli)#7 (18) { ["dbType":protected]=> NULL ["autoFree":protected]=> bool(false) ["model":protected]=> string(7) "_think_" ["pconnect":protected]=> bool(false) ["queryStr":protected]=> string(32) "SHOW COLUMNS FROM `ot_bookshell`" ["modelSql":protected]=> array(3) { ["Addons"]=> string(78) "SELECT `title`,`name` FROM `ot_addons` WHERE ( status=1 AND has_adminlist=1 ) " ["Menu"]=> string(138) "SELECT `id`,`pid`,`title`,`url`,`tip` FROM `ot_menu` WHERE ( `group` = '扩展' ) AND ( `pid` = 43 ) AND ( `hide` = 0 ) ORDER BY sort asc " ["Bookshell"]=> string(32) "SHOW COLUMNS FROM `ot_bookshell`" } ["lastInsID":protected]=> NULL ["numRows":protected]=> int(7) ["numCols":protected]=> int(6) ["transTimes":protected]=> int(0) ["error":protected]=> string(0) "" ["linkID":protected]=> array(1) { [0]=> object(mysqli)#6 (19) { ["affected_rows"]=> int(7) ["client_info"]=> string(79) "mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $" ["client_version"]=> int(50011) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(6) ["host_info"]=> string(20) "127.0.0.1 via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(6) "5.5.36" ["server_version"]=> int(50536) ["stat"]=> string(136) "Uptime: 46699 Threads: 2 Questions: 22568 Slow queries: 0 Opens: 833 Flush tables: 1 Open tables: 4 Queries per second avg: 0.483" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1208) ["warning_count"]=> int(0) } } ["_linkID":protected]=> object(mysqli)#6 (19) { ["affected_rows"]=> int(-1) ["client_info"]=> string(79) "mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $" ["client_version"]=> int(50011) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(6) ["host_info"]=> string(20) "127.0.0.1 via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(6) "5.5.36" ["server_version"]=> int(50536) ["stat"]=> string(136) "Uptime: 46699 Threads: 2 Questions: 22568 Slow queries: 0 Opens: 833 Flush tables: 1 Open tables: 4 Queries per second avg: 0.483" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(1208) ["warning_count"]=> int(0) } ["queryID":protected]=> object(mysqli_result)#8 (5) { ["current_field"]=> int(0) ["field_count"]=> int(6) ["lengths"]=> NULL ["num_rows"]=> int(7) ["type"]=> int(0) } ["connected":protected]=> bool(true) ["comparison":protected]=> array(10) { ["eq"]=> string(1) "=" ["neq"]=> string(2) "<>" ["gt"]=> string(1) ">" ["egt"]=> string(2) ">=" ["lt"]=> string(1) "<" ["elt"]=> string(2) "<=" ["notlike"]=> string(8) "NOT LIKE" ["like"]=> string(4) "LIKE" ["in"]=> string(2) "IN" ["notin"]=> string(6) "NOT IN" } ["selectSql":protected]=> string(96) "SELECT%DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%%LIMIT% %UNION%%COMMENT%" ["bind":protected]=> array(0) { } } ["pk":protected]=> string(2) "id" ["autoinc":protected]=> bool(true) ["tablePrefix":protected]=> string(3) "ot_" ["name":protected]=> string(9) "Bookshell" ["dbName":protected]=> string(0) "" ["connection":protected]=> string(0) "" ["tableName":protected]=> string(0) "" ["trueTableName":protected]=> string(12) "ot_bookshell" ["error":protected]=> string(0) "" ["fields":protected]=> array(9) { [0]=> string(2) "id" [1]=> string(5) "title" [2]=> string(6) "author" [3]=> string(11) "description" [4]=> string(7) "link_id" [5]=> string(8) "cover_id" [6]=> string(11) "update_time" ["_pk"]=> string(2) "id" ["_type"]=> array(7) { ["id"]=> string(16) "int(10) unsigned" ["title"]=> string(8) "char(80)" ["author"]=> string(8) "char(20)" ["description"]=> string(9) "char(140)" ["link_id"]=> string(16) "int(10) unsigned" ["cover_id"]=> string(7) "int(10)" ["update_time"]=> string(16) "int(10) unsigned" } } ["data":protected]=> array(0) { } ["options":protected]=> array(0) { } ["_map":protected]=> array(0) { } ["_scope":protected]=> array(0) { } ["autoCheckFields":protected]=> bool(true) ["patchValidate":protected]=> bool(false) ["methods":protected]=> array(12) { [0]=> string(5) "order" [1]=> string(5) "alias" [2]=> string(6) "having" [3]=> string(5) "group" [4]=> string(4) "lock" [5]=> string(8) "distinct" [6]=> string(4) "auto" [7]=> string(6) "filter" [8]=> string(8) "validate" [9]=> string(6) "result" [10]=> string(5) "token" [11]=> string(5) "index" } } array(6) { ["id"]=> array(6) { ["name"]=> string(2) "id" ["title"]=> string(2) "ID" ["type"]=> string(3) "num" ["remark"]=> string(0) "" ["is_show"]=> int(2) ["value"]=> int(0) } ["title"]=> array(7) { ["name"]=> string(5) "title" ["title"]=> string(6) "书名" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["author"]=> array(7) { ["name"]=> string(6) "author" ["title"]=> string(6) "作者" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["description"]=> array(7) { ["name"]=> string(11) "description" ["title"]=> string(6) "描述" ["type"]=> string(8) "textarea" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(1) } ["link_id"]=> array(7) { ["name"]=> string(7) "link_id" ["title"]=> string(6) "外链" ["type"]=> string(6) "string" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(0) } ["cover_id"]=> array(7) { ["name"]=> string(8) "cover_id" ["title"]=> string(6) "封面" ["type"]=> string(7) "picture" ["remark"]=> string(0) "" ["is_show"]=> int(3) ["value"]=> int(0) ["is_must"]=> int(0) } }以上是我输出的ot里面的而一个插件的addonmodel 结果使用empty方法判断为空,求解
ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。