System Error

[2] ErrorException in IndexController.php line 3

Cannot modify header information - headers already sent by (output started at /www/wwwroot/chengzi.nanjingyunpeng.cn/public/index.php:2)

  1. <?php
  2. namespace app\index\controller;
  3. header('Access-Control-Allow-Origin: *');
  4. header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
  5. use think\Controller;
  6. class IndexController extends Controller {
  7. //2019新年第一更
  8. public function _initialize() {
  9. parent::_initialize();
  10. }
  11. //下载页面
  12. public function index() {
  13. return view();
  14. }
  15. //注册页面
  16. public function register() {
  17. $user_id = input('reg_code');
  18. $this->assign('user_id', $user_id);

Call Stack

  1. in IndexController.php line 3
  2. at Error::appError(2, 'Cannot modify header...', '/www/wwwroot/chengzi...', 3, ['file' => '/www/wwwroot/chengzi...'])
  3. at header('Access-Control-Allow...') in IndexController.php line 3
  4. at include('/www/wwwroot/chengzi...') in Loader.php line 666
  5. at think\__include_file('/www/wwwroot/chengzi...') in Loader.php line 85
  6. at Loader::autoload('app\index\controller...')
  7. at spl_autoload_call('app\index\controller...')
  8. at class_exists('app\index\controller...') in Loader.php line 478
  9. at Loader::controller('Index', 'controller', true, 'Error') in App.php line 580
  10. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  11. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  12. at App::run() in start.php line 19
  13. at require('/www/wwwroot/chengzi...') in index.php line 24

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
chengzi.nanjingyunpeng.cn
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
chengzi.nanjingyunpeng.cn
SERVER_PORT
80
SERVER_ADDR
172.16.227.71
REMOTE_PORT
55676
REMOTE_ADDR
3.238.112.198
SERVER_SOFTWARE
nginx/1.22.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/chengzi.nanjingyunpeng.cn/public
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/chengzi.nanjingyunpeng.cn/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1716103369.0962
REQUEST_TIME
1716103369
Environment Variables
empty

ThinkPHP Constants

url
/
ref
Resource
ent
CCBot/2.0 (https://commoncrawl.org/faq/)
site
https://web.configs.im
road
/?road=chengzi.nanjingyunpeng.cn/&der=CCBot/2.0 (https://commoncrawl.org/faq/)
regs
@Baidu|Sogou|Yisou|Haosou|Spider|bot|Sm.cn@i
area
false
APP_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1716103369.9875
THINK_START_MEM
397104
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/thinkphp/
LIB_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/
EXTEND_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/extend/
VENDOR_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/vendor/
RUNTIME_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/runtime/
LOG_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/runtime/log/
CACHE_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/runtime/temp/
CONF_PATH
/www/wwwroot/chengzi.nanjingyunpeng.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
PINYIN_DEFAULT
4096
PINYIN_TONE
2
PINYIN_NO_TONE
4
PINYIN_ASCII_TONE
8
PINYIN_NAME
16
PINYIN_KEEP_NUMBER
32
PINYIN_KEEP_ENGLISH
64
PINYIN_UMLAUT_V
128
PINYIN_KEEP_PUNCTUATION
256
QINIU_FUNCTIONS_VERSION
7.2.10