<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.eventdnsbase.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'eventdnsbase.parseresolvconf.php',
    1 => 'EventDnsBase::parseResolvConf',
    2 => 'Scans the resolv.conf-formatted file',
  ),
  'up' => 
  array (
    0 => 'class.eventdnsbase.php',
    1 => 'EventDnsBase',
  ),
  'prev' => 
  array (
    0 => 'eventdnsbase.loadhosts.php',
    1 => 'EventDnsBase::loadHosts',
  ),
  'next' => 
  array (
    0 => 'eventdnsbase.setoption.php',
    1 => 'EventDnsBase::setOption',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/event/eventdnsbase/parseresolvconf.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="eventdnsbase.parseresolvconf" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventDnsBase::parseResolvConf</h1>
  <p class="verinfo">(PECL event &gt;= 1.2.6-beta)</p><p class="refpurpose"><span class="refname">EventDnsBase::parseResolvConf</span> &mdash; <span class="dc-title">Scans the resolv.conf-formatted file</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventdnsbase.parseresolvconf-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EventDnsBase::parseResolvConf</strong></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code>
   </span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Scans the resolv.conf-formatted file stored in filename, and read in all
   the options from it that are listed in flags
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventdnsbase.parseresolvconf-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
     <code class="parameter">flags</code>
    </dt>
    <dd>
     <p class="para">
      Determines what information is parsed from the
      <code class="literal">resolv.conf</code>
      file. See the man page for
      <code class="literal">resolv.conf</code>
      for the format of this file.
     </p>
     <p class="para">
      The following directives are not parsed from the file:
      <code class="literal">sortlist, rotate, no-check-names, inet6, debug</code>.
     </p>
     <p class="para">
      If this function encounters an error, the possible return values are:
      <ul class="simplelist">
       <li>
        <code class="literal">1</code> = failed to open file</li>
       <li>
        <code class="literal">2</code> = failed to stat file</li>
       <li>
        <code class="literal">3</code> = file too large</li>
       <li>
        <code class="literal">4</code> = out of memory</li>
       <li>
        <code class="literal">5</code> = short read from file</li>
       <li>
        <code class="literal">6</code> = no nameservers listed in the file</li>
      </ul>
     </p>
    </dd>
   
   
    <dt>
     <code class="parameter">filename</code>
    </dt>
    <dd>
     <p class="para">
      Path to
      <code class="literal">resolv.conf</code>
      file.
     </p>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventdnsbase.parseresolvconf-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>

</div><?php manual_footer($setup); ?>