[2] ErrorException in Plugin.php line 20

filesize(): stat failed for /data/wwwroot/http/淘客数据_chorme_1.0.0_zip.zip

  1. protected $noNeedRight = ['*'];
  2. public function normal()
  3. {
  4. $file = ROOT_PATH . '淘客数据_chorme_1.0.0_zip.zip';
  5. // $index = ROOT_PATH . "public/download/index.php";
  6. $fileName = '淘客数据_chorme_1.0.0_zip.zip'; //获取文件名
  7. // $f = file_get_contents($file);
  8. // fopen($index, 'r+');//打开文件
  9. $file_size = filesize($file);//获取文件的字节
  10. //下载文件需要用到的头
  11. header("Content-type: application/octet-stream");
  12. header("Accept-Ranges: bytes");
  13. header("Accept-Length:".$file_size);
  14. header("Content-Disposition: attachment; filename=$fileName");
  15. $fp = fopen($file,"r");
  16. $buffer = 1024; //设置一次读取的字节数,每读取一次,就输出数据(即返回给浏览器)
  17. $file_count = 0; //读取的总字节数

Call Stack

  1. in Plugin.php line 20
  2. at Error::appError(2, 'filesize(): stat fai...', '/data/wwwroot/http/a...', 20, ['file' => '...', 'fileName' => '淘客数据_chorme_...'])
  3. at filesize('...') in Plugin.php line 20
  4. at Plugin->normal()
  5. at ReflectionMethod->invokeArgs(object(Plugin), []) in App.php line 343
  6. at App::invokeMethod([object(Plugin), 'normal'], []) in App.php line 611
  7. at App::module(['download', 'plugin', 'normal'], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...], true) in App.php line 456
  8. at App::exec(['type' => 'module', 'module' => ['download', 'plugin', 'normal']], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/data/wwwroot/http/t...') in index.php line 26

Environment Variables

GET Data

temp_url_path
download/plugin/normal.html
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
PHP_APP_DEBUG
1
PHP_APP_TRACE
PHP_ZUANQUN_STATIC_DOMAIN
http://static.haodantui.com
PHP_ZUANQUN_SESSION_DOMAIN
.haodantui.com
HTTP_HOST
www.haodantui.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
//download/plugin/normal.html
REDIRECT_STATUS
200
SERVER_NAME
help.haodantui.com
SERVER_PORT
80
SERVER_ADDR
172.17.0.2
REMOTE_PORT
36662
REMOTE_ADDR
54.81.58.140
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/http/public
DOCUMENT_URI
/index.php//download/plugin/normal.html
REQUEST_URI
/download/plugin/normal.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/http/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php//download/plugin/normal.html
REQUEST_TIME_FLOAT
1711715015.0347
REQUEST_TIME
1711715015
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/wwwroot/http/public/../application/
EXTEND_PATH
/data/wwwroot/http/public/../library/
THINK_VERSION
5.0.24
THINK_START_TIME
1711715015.035
THINK_START_MEM
403096
EXT
.php
DS
/
THINK_PATH
/data/wwwroot/http/thinkphp/
LIB_PATH
/data/wwwroot/http/thinkphp/library/
CORE_PATH
/data/wwwroot/http/thinkphp/library/think/
TRAIT_PATH
/data/wwwroot/http/thinkphp/library/traits/
ROOT_PATH
/data/wwwroot/http/
VENDOR_PATH
/data/wwwroot/http/vendor/
RUNTIME_PATH
/data/wwwroot/http/runtime/
LOG_PATH
/data/wwwroot/http/runtime/log/
CACHE_PATH
/data/wwwroot/http/runtime/cache/
TEMP_PATH
/data/wwwroot/http/runtime/temp/
CONF_PATH
/data/wwwroot/http/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false