出于某种原因,当我 print_r 包含一个对象的变量时,我得到了数据。但是,当我尝试使用->
它所说的符号访问每个项目时NULL
。
这是print_r
转储$user_data
:
STDCLASS OBJECT (
[UACC_ID] => 6
[UACC_GROUP_FK] => 1
[UACC_EMAIL] => xxx@GMAIL.COM
[UACC_USERNAME] => xxxx
[UACC_PASSWORD] => $2A$08$CLSxxxxxxEOS7D2NDCSDD3P6A6
[UACC_IP_ADDRESS] => xx.xxx.xx.65
[UACC_SALT] => C64JYWY7ZS
[UACC_ACTIVATION_TOKEN] =>
[UACC_FORGOTTEN_PASSWORD_TOKEN] =>
[UACC_FORGOTTEN_PASSWORD_EXPIRE] => 0000-00-00 00:00:00
[UACC_UPDATE_EMAIL_TOKEN] =>
[UACC_UPDATE_EMAIL] =>
[UACC_ACTIVE] => 1
[UACC_SUSPEND] => 0
[UACC_FAIL_LOGIN_ATTEMPTS] => 0
[UACC_FAIL_LOGIN_IP_ADDRESS] =>
[UACC_DATE_FAIL_LOGIN_BAN] => 0000-00-00 00:00:00
[UACC_DATE_LAST_LOGIN] => 2013-05-05 07:18:34
[UACC_DATE_ADDED] => 2013-04-28 09:34:39
[UGRP_ID] => 1
[UGRP_NAME] => PUBLIC
[UGRP_DESC] => PUBLIC USER : HAS NO ADMIN ACCESS RIGHTS.
[UGRP_ADMIN] => 0
[UPRO_ID] => 6
[UPRO_UACC_FK] => 6
[UPRO_COMPANY] =>
[UPRO_FIRST_NAME] => xxxx
[UPRO_LAST_NAME] => xxxxx
[UPRO_PHONE] => 01392
[UPRO_NEWSLETTER] => 0
[UADD_ID] =>
[UADD_UACC_FK] =>
[UADD_ALIAS] =>
[UADD_RECIPIENT] =>
[UADD_PHONE] =>
[UADD_COMPANY] =>
[UADD_ADDRESS_01] =>
[UADD_ADDRESS_02] =>
[UADD_CITY] =>
[UADD_COUNTY] =>
[UADD_POST_CODE] =>
[UADD_COUNTRY] =>
)
但是,当我尝试这个时,我得到NULL
:
var_dump($user_data->UACC_ID);
我似乎无法通过使用符号$user_data->UACC_EMAIL
等来回应任何东西。我做错了什么?
谢谢你们。看起来输出正在被转换为 CSS 中的 ALLCAPS,所以我没有意识到该库实际上使用了小写变体。
谢谢。