gpt4 book ai didi

PHP CLASS undefined variable (但已定义)

转载 作者:可可西里 更新时间:2023-11-01 00:39:48 28 4
gpt4 key购买 nike

<分区>

我只是想不通为什么会出现这个错误:

Notice: Undefined variable: authTime in /.../classname.class.php on line 33

class ClassName {

private $authTime = null;


const API_URL = '...';
const CLIENT_ID = '...';
const CLIENT_SECRET = '...';

private static $TOKEN = NULL;


public function __construct() {
$this->_authTime = $authTime; // <----- Line 33
if(!self::$TOKEN OR $this->AuthTime('GET') > 3600 OR !$this->_authTime) {
self::authorise();
}
}

public function getAuthTime() {
return $this->_authTime; // Returns NULL
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com