[8] ErrorException in News.php line 25

未定义数组索引: news_content

  1. public function index()
  2. {
  3. $page=input('page',1);
  4. $news=Db::name('news')->alias("a")->join(config('database.prefix').'member_list b','a.news_auto =b.member_list_id')->where(array('n_id'=>input('id'),'news_open'=>1,'news_back'=>0))->find();
  5. $admin_array = Db::name('admin')->find($news['member_list_id']);
  6. $news['admin_realname'] = $admin_array['admin_realname'];
  7. if(empty($news)){
  8. $this->error(lang('operation not valid'));
  9. }
  10. $news_data=explode('_ueditor_page_break_tag_',$news['news_content']);
  11. $total=count($news_data);
  12. $news['content']=$news_data[$page-1];
  13. $news['page']='';
  14. if($total>1){
  15. $prevbtn=($page<=1)?'<li class="disabled"><span>&laquo;</span></li>':'<li><a href="' . url('home/News/index',['id'=>input('id'),'page'=>($page-1)]) . '">&laquo;</a></li>';
  16. $nextbtn=($page>=$total)?'<li class="disabled"><span>&raquo;</span></li>':'<li><a href="' . url('home/News/index',['id'=>input('id'),'page'=>($page+1)]) . '">&raquo;</a></li>';
  17. $link=$this->getLinks($page,$total,input('id'));
  18. $news['page']=sprintf(
  19. '<ul class="pagination">%s %s %s</ul>',

Call Stack

  1. in News.php line 25
  2. at Error::appError(8, 'Undefined index: new...', 'E:\phpStudy2018\PHPT...', 25, ['page' => 1, 'news' => ['admin_realname' => '管理员'], 'admin_array' => ['admin_id' => 1, 'admin_username' => 'admin', 'admin_pwd' => '226f04b38d50c0707674...', ...]]) in News.php line 25
  3. at News->index()
  4. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  5. at App::invokeMethod([object(News), 'index'], []) in App.php line 611
  6. at App::module(['home', 'News', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['home', 'News', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('E:\phpStudy2018\PHPT...') in index.php line 20

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

PROCESSOR_ARCHITEW6432
AMD64
_FCGI_X_PIPE_
\\.\pipe\IISFCGI-9eeded73-99de-4db4-9d9d-cca8e331f74f
PHPRC
E:\phpStudy2018\PHPTutorial\php\php-5.4.45-nts\
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config
APP_POOL_ID
DefaultAppPool
CommonProgramFiles
C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
iZ236m2ustfZ
ComSpec
C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK
NO
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
4
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
x86
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
iZ236m2ustfZ$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
windows_tracing_flags
3
windows_tracing_logfile
C:\BVTBin\Tests\installpackage\csilogfile.log
ORIG_PATH_INFO
/index.php/news/index.html
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/7.5
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
0
SERVER_PORT
80
SERVER_NAME
www.zjzy.com
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
E:\phpStudy2018\PHPTutorial\WWW\zjzy\index.php
REQUEST_URI
/news/index.html
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
49996
REMOTE_HOST
185.184.220.88
REMOTE_ADDR
185.184.220.88
QUERY_STRING
PATH_TRANSLATED
E:\phpStudy2018\PHPTutorial\WWW\zjzy\index.php\news\index.html
PATH_INFO
/news/index.html
LOGON_USER
LOCAL_ADDR
172.16.7.213
INSTANCE_META_PATH
/LM/W3SVC/1
INSTANCE_NAME
ZJZY.COM
INSTANCE_ID
1
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS
off
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
E:\phpStudy2018\PHPTutorial\WWW\zjzy
CONTENT_TYPE
CONTENT_LENGTH
0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\
APPL_MD_PATH
/LM/W3SVC/1/ROOT
IIS_UrlRewriteModule
7.1.0871.0
HTTP_X_ORIGINAL_URL
/news/index.html
HTTP_X_FORWARDED_FOR
222.124.102.161
HTTP_CLIENT_IP
60.219.220.224
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
HTTP_REFERER
http://jiangxinyingshi.com/news/index.html
HTTP_HOST
www.zjzy.com
HTTP_ACCEPT_ENCODING
gzip,deflate
HTTP_ACCEPT
*/*
HTTP_CONTENT_LENGTH
0
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/news/index.html
REQUEST_TIME_FLOAT
1611139879.4422
REQUEST_TIME
1611139879
Environment Variables
empty

ThinkPHP Constants

APP_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/app/
RUNTIME_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/data/runtime/
THINK_VERSION
5.0.24
THINK_START_TIME
1611139879.4422
THINK_START_MEM
152528
EXT
.php
DS
\
THINK_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\thinkphp\
LIB_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\thinkphp\library\
CORE_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\thinkphp\library\think\
TRAIT_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\thinkphp\library\traits\
ROOT_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\
EXTEND_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\extend\
VENDOR_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\vendor\
LOG_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/data/runtime/log\
CACHE_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/data/runtime/cache\
TEMP_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/data/runtime/temp\
CONF_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
QINIU_FUNCTIONS_VERSION
7.2.0
ADDON_PATH
E:\phpStudy2018\PHPTutorial\WWW\zjzy\addons\
QR_MODE_NUL
-1
QR_MODE_NUM
0
QR_MODE_AN
1
QR_MODE_8
2
QR_MODE_KANJI
3
QR_MODE_STRUCTURE
4
QR_ECLEVEL_L
0
QR_ECLEVEL_M
1
QR_ECLEVEL_Q
2
QR_ECLEVEL_H
3
QR_FORMAT_TEXT
0
QR_FORMAT_PNG
1
QR_CACHEABLE
false
QR_CACHE_DIR
false
QR_LOG_DIR
false
QR_FIND_BEST_MASK
true
QR_FIND_FROM_RANDOM
2
QR_DEFAULT_MASK
2
QR_PNG_MAXIMUM_SIZE
1024
QRSPEC_VERSION_MAX
40
QRSPEC_WIDTH_MAX
177
QRCAP_WIDTH
0
QRCAP_WORDS
1
QRCAP_REMINDER
2
QRCAP_EC
3
QR_IMAGE
true
STRUCTURE_HEADER_BITS
20
MAX_STRUCTURED_SYMBOLS
16
N1
3
N2
3
N3
40
N4
10
__ROOT__
MODULE_NAME
home
CONTROLLER_NAME
News
ACTION_NAME
index