Net_NNTP::connect() -- Connects to a newsserver
Описание
Connect to a specific newsserver
Возвращаемое значение
boolean -
Возвращает TRUE при удаче и
PEAR_Error в обратном случае.
Throws
Таблица 49-1. Возможные значения PEAR_Error
Error code | Error message | Reason | Solution |
---|
NULL |
"Could not connect to NNTP-server $host"
or
"Not connected"
|
The connection couldn't be established because
wrong server name or adress the host itself isn't link to a network a firewall doesn't allow an access
|
Check for server name, the connection to the net and possible
firewalls on client or server side
|
Заметка
Эта функция не должна вызываться статически.
Пример
Пример 49-1. Using connect() require_once "Net/NNTP.php";
$nntp = new Net_NNTP;
$ret = $nntp->connect("news.php.net");
if( PEAR::isError($ret)) {
// handle error
} else {
// success
} |
|
HIVE: All information for read only. Please respect copyright! |
|