[0] ThrowableError in Index.php line 558

致命错误: Cannot use object of type stdClass as array

  1. }else{
  2. $url1 = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=".$this->getAccessTokens();
  3. $data1 = array(
  4. "expire_seconds" => 3600, //二维码的有效时间(1小时)
  5. "action_name" => "QR_STR_SCENE",
  6. "action_info" => array("scene" => array("scene_str" => $scene_str))
  7. );
  8. $result1 = $this->httpRequest($url1, json_encode($data1));
  9. $array1 = json_decode($result);
  10. return $this->generateQrcode($array1['ticket']);
  11. }
  12. // var_dump($array);exit;
  13. }
  14. public function generateQrcode($ticket){
  15. return "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=".$ticket;
  16. }
  17. public function getcode(){
  18. //基本配置

Call Stack

  1. in Index.php line 558
  2. at Index->getQrcode('17116342216438') in Index.php line 252
  3. at Index->index()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  6. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['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('/www/wwwroot/xayim.c...') in index.php line 17

Environment Variables

GET Data

m
play
id
655
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
xayim.cn
HTTP_REFERER
http://ulinixkino.com/?m=play&id=655
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
xayim.cn
SERVER_PORT
80
SERVER_ADDR
10.0.0.14
REMOTE_PORT
35356
REMOTE_ADDR
34.203.242.200
SERVER_SOFTWARE
nginx/1.20.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/xayim.cn/public
DOCUMENT_URI
/index.php
REQUEST_URI
/?m=play&id=655
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
m=play&id=655
SCRIPT_FILENAME
/www/wwwroot/xayim.cn/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711634221.113
REQUEST_TIME
1711634221
Environment Variables
empty

ThinkPHP Constants

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