如何識別我能夠登錄rets? 這是我的代碼和輸出。如何認識到我能夠登錄rets?
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
//date_default_timezone_set('America/New_York');
require_once("vendor/autoload.php");
//$log = new \Monolog\Logger('PHRETS');
//$log->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG));
$config = new \PHRETS\Configuration;
$config->setLoginUrl('*****************');
$config->setUsername('****');
$config->setPassword('****');
$config->setUserAgent('****');
$config->setRetsVersion('1.7.2');
$config->setOption('disable_follow_location',false);
$config->setOption('use_post_method',true);
$rets = new \PHRETS\Session($config);
$rets->setLogger($log);
$connect = $rets->Login();
var_dump($connect->getBody());
輸出
注意:
Trying to get property of non-object in /var/www/html/glvar/rets/vendor/troydavisson/phrets/src/Parsers/GetMetadata/System.php on line 26
致命錯誤:
Call to a member function attributes() on a non-object in /var/www/html/glvar/rets/vendor/troydavisson/phrets/src/Parsers/GetMetadata/System.php on line 26
如何從該R知道esponse,我登錄rets和 我可以得到任何數據。
File:System.php,第26行,檢查你如何使用成員函數attributes(),這個錯誤你在非對象上調用它..這是致命的錯誤.. – Ultrazz008
沒有定義'$ log'什麼都沒有即將發生。 – RST
$ log = new \ Monolog \ Logger('PHRETS'); $ log-> pushHandler(new \ Monolog \ Handler \ StreamHandler('php:// stdout',\ Monolog \ Logger :: DEBUG)); 我做了這個,現在它給我出來作爲 NULL 我登錄? –