Net_NNTP::connect() -- Connects to a newsserver Описание
Connect to a specific newsserver
Возвращаемое значение
boolean -
Возвращает TRUE при удаче и
PEAR_Error в обратном случае.
Throws
Таблица 34-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
|
ЗаметкаЭта функция не должна вызываться статически. ПримерПример 34-1. Using connect()
<?php
require_once "Net/NNTP.php";
$nntp = new Net_NNTP;
$ret = $nntp->connect("news.php.net");
if( PEAR::isError($ret)) {
// handle error
} else {
// success
}
?>
|
|
|