#0 [8]ErrorException in Article.php line 215

未定义数组索引: template_id

  1. //获得当前图文所属的栏目信息
  2. $articleCate= DB::name('DataArticleCate')->where(["id" => $catId])->find(); //分类信息
  3. $this->assign('catInfo',$articleCate); //当前分类信息
  4. if(empty($articleCate['link_name'])){
  5. $articleCate['link_name'] = "List";
  6. }
  7. $this->assign('linkName',$articleCate['link_name']); //当前分类的静态名称
  8. $templateInfo = DB::name('DataTemplate')->where(["id" => $articleCate['template_id']])->find(); //分类模板信息
  9. $contentTemplateInfo = DB::name('DataTemplate')->where(["id" => $articleCate['content_template_id']])->find(); //内容模板信息
  10. if(!$contentTemplateInfo['table_name']){
  11. return $this->fetch("error_page");
  12. exit;
  13. }
  14. //获得当前图文信息
  15. $article = Db::name($contentTemplateInfo['table_name'])->where('id', $id)->find();

Call Stack

  1. in Article.php line 215
  2. at Error->appError(8, 'Undefined index: tem...', 'D:\wwwroot\shanghbc\...', 215, ['id' => '35', 'catId' => 'favicon.ico', 'articleCate' => ['link_name' => 'List']]) in Article.php line 215
  3. at Article->show()
  4. at ReflectionMethod->invokeArgs(object(Article), []) in Container.php line 344
  5. at Container->invokeReflectMethod(object(Article), object(ReflectionMethod), ['id' => '35', 'cat_id' => 'favicon.ico']) in Controller.php line 110
  6. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  7. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  8. at Pipeline->then(object(Closure)) in Controller.php line 113
  9. at Controller->exec() in Dispatch.php line 90
  10. at Dispatch->run() in Route.php line 772
  11. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  12. at Pipeline->think\{closure}(object(Request)) in Library.php line 139
  13. at Library->think\admin\{closure}(object(Request), object(Closure))
  14. at call_user_func(object(Closure), object(Request), object(Closure)) in Middleware.php line 142
  15. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  16. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  17. at Pipeline->then(object(Closure)) in Route.php line 773
  18. at Route->dispatch(object(Request), object(Closure)) in Http.php line 216
  19. at Http->dispatchToRoute(object(Request)) in Http.php line 206
  20. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  21. at Pipeline->think\{closure}(object(Request)) in Multiple.php line 72
  22. at Multiple->think\admin\multiple\{closure}(object(Request)) in Pipeline.php line 59
  23. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  24. at Pipeline->then(object(Closure)) in Multiple.php line 73
  25. at Multiple->handle(object(Request), object(Closure))
  26. at call_user_func([object(Multiple), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  27. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  28. at Pipeline->think\{closure}(object(Request)) in LoadLangPack.php line 57
  29. at LoadLangPack->handle(object(Request), object(Closure))
  30. at call_user_func([object(LoadLangPack), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  31. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  32. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  33. at SessionInit->handle(object(Request), object(Closure))
  34. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  35. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  36. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  37. at Pipeline->then(object(Closure)) in Http.php line 207
  38. at Http->runWithRequest(object(Request)) in Http.php line 170
  39. at Http->run() in SystemService.php line 484
  40. at SystemService->doInit() in index.php line 10

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Session
lang cn
Server/Request Data
_FCGI_X_PIPE_ \\.\pipe\IISFCGI-9cb256e8-7846-4026-aa16-80290754aab3
PHP_FCGI_MAX_REQUESTS 1000
PHPRC C:\php_73
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG C:\inetpub\temp\apppools\shanghbc\shanghbc.config
APP_POOL_ID shanghbc
CommonProgramFiles C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME EBS-6763
ComSpec C:\Windows\system32\cmd.exe
DriverData C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS 8
OS Windows_NT
Path C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\php_52;D:\mysql\bin;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE x86
PROCESSOR_ARCHITEW6432 AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 5504
ProgramData C:\ProgramData
ProgramFiles C:\Program Files (x86)
ProgramFiles(x86) C:\Program Files (x86)
ProgramW6432 C:\Program Files
PSModulePath C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC C:\Users\Public
SystemDrive C:
SystemRoot C:\Windows
TEMP C:\Windows\TEMP
TMP C:\Windows\TEMP
USERDOMAIN WORKGROUP
USERNAME EBS-6763$
USERPROFILE C:\Windows\system32\config\systemprofile
windir C:\Windows
ORIG_PATH_INFO /index.php
URL /index.php
SERVER_SOFTWARE Microsoft-IIS/10.0
SERVER_PROTOCOL HTTP/1.1
SERVER_PORT_SECURE 0
SERVER_PORT 80
SERVER_NAME www.baochengyejin.com
SCRIPT_NAME /index.php
SCRIPT_FILENAME D:\wwwroot\shanghbc\wwwroot\index.php
REQUEST_URI /index/Article/show/id/35/cat_id/favicon.ico
REQUEST_METHOD GET
REMOTE_USER
REMOTE_PORT 58639
REMOTE_HOST 127.0.0.1
REMOTE_ADDR 127.0.0.1
QUERY_STRING s=index/Article/show/id/35/cat_id/favicon.ico
PATH_TRANSLATED D:\wwwroot\shanghbc\wwwroot\index.php
LOGON_USER
LOCAL_ADDR 127.0.0.1
INSTANCE_META_PATH /LM/W3SVC/11981
INSTANCE_NAME SHANGHBC
INSTANCE_ID 11981
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS off
GATEWAY_INTERFACE CGI/1.1
DOCUMENT_ROOT D:\wwwroot\shanghbc\wwwroot
CONTENT_TYPE
CONTENT_LENGTH 0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH D:\wwwroot\shanghbc\wwwroot\
APPL_MD_PATH /LM/W3SVC/11981/ROOT
IIS_UrlRewriteModule 7,1,1993,2336
WEBSOCKET_VERSION 13
UNENCODED_URL /index/Article/show/id/35/cat_id/favicon.ico
IIS_WasUrlRewritten 1
HTTP_X_ORIGINAL_URL /index/Article/show/id/35/cat_id/favicon.ico
HTTP_CLIENT_IP 216.73.216.150
HTTP_X_FORWARDED_PROTO http
HTTP_REALIP_WTS_X 198.2.231.215
HTTP_X_REAL_IP 211.149.229.22
HTTP_X_FORWARDED_FOR 198.2.231.215
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_REFERER http://www.baochengyejin.com
HTTP_HOST www.baochengyejin.com
HTTP_ACCEPT_LANGUAGE zh-CN,zh;q=0.9,en;q=0.8
HTTP_ACCEPT_ENCODING gzip
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
HTTP_CONTENT_LENGTH 0
HTTP_PRAGMA no-cache
HTTP_CONNECTION close
HTTP_CACHE_CONTROL no-cache
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1776201314.4178
REQUEST_TIME 1776201314