Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5037

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add URL rewriter values</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ob-start.html">ob_start</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.output-reset-rewrite-vars.html">output_reset_rewrite_vars</a></div>
 <div class="up"><a href="ref.outcontrol.html">Output Control Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.output-add-rewrite-var" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">output_add_rewrite_var</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">output_add_rewrite_var</span> &mdash; <span class="dc-title">Add URL rewriter values</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.output-add-rewrite-var-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>output_add_rewrite_var</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>

  <p class="para rdfs-comment">
   This function adds another name/value pair to the URL rewrite mechanism.
   The name and value will be added to URLs (as GET parameter) and forms
   (as hidden input fields) the same way as the session ID when transparent
   URL rewriting is enabled with <a href="session.configuration.html#ini.session.use-trans-sid" class="link">session.use_trans_sid</a>. Please
   note that absolute URLs (http://example.com/..) aren&#039;t rewritten.
  </p>
  <p class="para">
   This function&#039;s behavior is controlled by the <a href="session.configuration.html#ini.url-rewriter.tags" class="link">url_rewriter.tags</a> <var class="filename">php.ini</var>
   parameter.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    Calling this function will implicitly start output buffering if it is
    not active already.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.output-add-rewrite-var-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">name</code></em></span>
     <dd>

      <p class="para">
       The variable name.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">value</code></em></span>
     <dd>

      <p class="para">
       The variable value.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.output-add-rewrite-var-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.output-add-rewrite-var-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-475">
    <p><strong>Example #1  <span class="function"><strong>output_add_rewrite_var()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />output_add_rewrite_var</span><span style="color: #007700">(</span><span style="color: #DD0000">'var'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'value'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;some&nbsp;links<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="file.php"&gt;link&lt;/a&gt;<br />&lt;a&nbsp;href="http://example.com"&gt;link2&lt;/a&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;a&nbsp;form<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">'&lt;form&nbsp;action="script.php"&nbsp;method="post"&gt;<br />&lt;input&nbsp;type="text"&nbsp;name="var2"&nbsp;/&gt;<br />&lt;/form&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ob_list_handlers</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
&lt;a href=&quot;file.php?var=value&quot;&gt;link&lt;/a&gt;
&lt;a href=&quot;http://example.com&quot;&gt;link2&lt;/a&gt;

&lt;form action=&quot;script.php&quot; method=&quot;post&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;var&quot; value=&quot;value&quot; /&gt;
&lt;input type=&quot;text&quot; name=&quot;var2&quot; /&gt;
&lt;/form&gt;

Array
(
    [0] =&gt; URL-Rewriter
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.output-add-rewrite-var-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.output-reset-rewrite-vars.html" class="function" rel="rdfs-seeAlso">output_reset_rewrite_vars()</a> - Reset URL rewriter values</span></li>
    <li class="member"> <span class="function"><a href="function.ob-flush.html" class="function" rel="rdfs-seeAlso">ob_flush()</a> - Flush (send) the output buffer</span></li>
    <li class="member"> <span class="function"><a href="function.ob-list-handlers.html" class="function" rel="rdfs-seeAlso">ob_list_handlers()</a> - List all output handlers in use</span></li>
   </ul>
  </p>
 </div>
  

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ob-start.html">ob_start</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.output-reset-rewrite-vars.html">output_reset_rewrite_vars</a></div>
 <div class="up"><a href="ref.outcontrol.html">Output Control Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>