[0] ThrowableError in Wechat.php line 23

致命错误: Class 'Yurun\OAuthLogin\Weixin\OAuth2' not found

  1. * Time: 14:27
  2. */
  3. class Wechat extends Controller
  4. {
  5. public function _initialize()
  6. {
  7. $this->appid = "wx4c25b70c4f44a067";
  8. $this->appkey="45c9fec54c3cd17155fd427195ab7b8f";
  9. $this->callbackurl = "http://hao.qudong.com/Wechatcallback";
  10. $this->wechatouth = new \Yurun\OAuthLogin\Weixin\OAuth2($this->appid, $this->appkey, $this->callbackurl);
  11. $this->url = $this->wechatouth->getAuthUrl();
  12. parent::_initialize();
  13. }
  14. public function login()
  15. {
  16. $state = md5(uniqid(rand(), TRUE));
  17. $_SESSION["wx_state"] = $state;
  18. $wxurl = "https://open.weixin.qq.com/connect/qrconnect?appid=" . $this->appid . "&redirect_uri=".urlencode($this->callbackurl)."&response_type=code&scope=snsapi_login&state=".$state."#wechat_redirect";

Call Stack

  1. in Wechat.php line 23
  2. at Wechat->_initialize() in Controller.php line 59
  3. at Controller->__construct()
  4. at ReflectionClass->newInstanceArgs() in App.php line 359
  5. at App::invokeClass() in Loader.php line 479
  6. at Loader::controller() in App.php line 580
  7. at App::module() in App.php line 456
  8. at App::exec() in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/data/hao.qudong.com...') in index.php line 18
  11. at include('/data/hao.qudong.com...') in index.php line 3

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_CTL_ORIGIN_SCHEME
https
HTTP_X_FORWARDED_FOR
54.226.68.181
HTTP_CTL_ACCESS_CHECK
8224d3818cb5c2da180353d789f407c8|1711712497
HTTP_CTL_SRC_IP
54.226.68.181
HTTP_CTL_STORE_URL
http://hao.qudong.com/wechatlogin
HTTP_CTL_C_C
no-cache
HTTP_X_VIA
edge-js-changzhou8-cache-25.in.ctcdn.cn
HTTP_REQUEST_ID
6606a8f1476e9a8f15ecd9d3de428cd6
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
hao.qudong.com
PATH_INFO
/wechatlogin
REDIRECT_STATUS
200
SERVER_NAME
hao.qudong.com
SERVER_PORT
443
SERVER_ADDR
192.168.0.17
REMOTE_PORT
54062
REMOTE_ADDR
58.216.30.154
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/data/hao.qudong.com
DOCUMENT_URI
/index.php
REQUEST_URI
/wechatlogin
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/wechatlogin
SCRIPT_FILENAME
/data/hao.qudong.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711712497.2577
REQUEST_TIME
1711712497
Environment Variables
empty

ThinkPHP Constants

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