<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.domdocument.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'domdocument.createentityreference.php',
    1 => 'DOMDocument::createEntityReference',
    2 => 'Create new entity reference node',
  ),
  'up' => 
  array (
    0 => 'class.domdocument.php',
    1 => 'DOMDocument',
  ),
  'prev' => 
  array (
    0 => 'domdocument.createelementns.php',
    1 => 'DOMDocument::createElementNS',
  ),
  'next' => 
  array (
    0 => 'domdocument.createprocessinginstruction.php',
    1 => 'DOMDocument::createProcessingInstruction',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/dom/domdocument/createentityreference.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="domdocument.createentityreference" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DOMDocument::createEntityReference</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">DOMDocument::createEntityReference</span> &mdash; <span class="dc-title">Create new entity reference node</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-domdocument.createentityreference-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>DOMDocument::createEntityReference</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>): <span class="type"><span class="type"><a href="class.domentityreference.php" class="type DOMEntityReference">DOMEntityReference</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   This function creates a new instance of class
   <span class="classname"><a href="class.domentityreference.php" class="classname">DOMEntityReference</a></span>. 此节点出现在文档中，除非是用诸如
<span class="function"><strong>DOMNode->appendChild()</strong></span> 等函数来将其插入。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-domdocument.createentityreference-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       The content of the entity reference, e.g. the entity reference minus
       the leading <code class="literal">&amp;</code> and the trailing
       <code class="literal">;</code> characters.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-domdocument.createentityreference-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The new <span class="classname"><a href="class.domentityreference.php" class="classname">DOMEntityReference</a></span> or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if an error
   occurred.
  </p>
 </div>

 <div class="refsect1 errors" id="refsect1-domdocument.createentityreference-errors">
  <h3 class="title">错误／异常</h3>
  <p class="simpara">
   May throw a <span class="exceptionname"><a href="class.domexception.php" class="exceptionname">DOMException</a></span> with the
   following error codes:
  </p>
  <p class="para">
   <dl>
    
     <dt><strong><code><a href="dom.constants.php#constant.dom-invalid-character-err">DOM_INVALID_CHARACTER_ERR</a></code></strong></dt>
     <dd>
      <p class="para">
       Raised if <code class="parameter">name</code> contains an invalid character.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-domdocument.createentityreference-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="domnode.appendchild.php" class="methodname" rel="rdfs-seeAlso">DOMNode::appendChild()</a> - Adds new child at the end of the children</span></li>
    <li><span class="methodname"><a href="domdocument.createattribute.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createAttribute()</a> - Create new attribute</span></li>
    <li><span class="methodname"><a href="domdocument.createattributens.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createAttributeNS()</a> - Create new attribute node with an associated namespace</span></li>
    <li><span class="methodname"><a href="domdocument.createcdatasection.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createCDATASection()</a> - Create new cdata node</span></li>
    <li><span class="methodname"><a href="domdocument.createcomment.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createComment()</a> - Create new comment node</span></li>
    <li><span class="methodname"><a href="domdocument.createdocumentfragment.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createDocumentFragment()</a> - Create new document fragment</span></li>
    <li><span class="methodname"><a href="domdocument.createelement.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createElement()</a> - Create new element node</span></li>
    <li><span class="methodname"><a href="domdocument.createelementns.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createElementNS()</a> - Create new element node with an associated namespace</span></li>
    <li><span class="methodname"><a href="domdocument.createprocessinginstruction.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createProcessingInstruction()</a> - Creates new PI node</span></li>
    <li><span class="methodname"><a href="domdocument.createtextnode.php" class="methodname" rel="rdfs-seeAlso">DOMDocument::createTextNode()</a> - Create new text node</span></li>
   </ul>
  </p>
 </div>

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