<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.apache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.virtual.php',
    1 => 'virtual',
    2 => 'Perform an Apache sub-request',
  ),
  'up' => 
  array (
    0 => 'ref.apache.php',
    1 => 'Apache Функції',
  ),
  'prev' => 
  array (
    0 => 'function.getallheaders.php',
    1 => 'getallheaders',
  ),
  'next' => 
  array (
    0 => 'book.fpm.php',
    1 => 'FastCGI Process Manager',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/apache/functions/virtual.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.virtual" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">virtual</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">virtual</span> &mdash; <span class="dc-title">Perform an Apache sub-request</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.virtual-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>virtual</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$uri</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>virtual()</strong></span> is an Apache-specific function which
   is similar to <code class="literal">&lt;!--#include virtual...--&gt;</code> in
   <code class="literal">mod_include</code>.
   It performs an Apache sub-request.  It is useful for including
   CGI scripts or <var class="filename">.shtml</var> files, or anything else that you would
   parse through Apache. Note that for a CGI script, the script
   must generate valid CGI headers.  At the minimum that means it
   must generate a <code class="literal">Content-Type</code> header.
  </p>
  <p class="para">
   To run the sub-request, all buffers are terminated and flushed to the
   browser, pending headers are sent too.
  </p>
  <p class="simpara">Ця функція доступна, якщо PHP
встановлено як модуль вебсервера Apache.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.virtual-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">uri</code></dt>
     <dd>
      <p class="para">
       The file that the virtual command will be performed on.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.virtual-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Performs the virtual command on success, or returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.virtual-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   See <span class="function"><a href="function.apache-note.php" class="function">apache_note()</a></span> for an example.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.virtual-notes">
  <h3 class="title">Примітки</h3>
  <div class="warning"><strong class="warning">Увага</strong>
   <p class="para">
    The query string can be passed to the included file but
    <var class="varname"><a href="reserved.variables.get.php" class="classname">$_GET</a></var> is copied from the parent script and only
    <var class="varname"><a href="reserved.variables.server.php" class="classname">$_SERVER['QUERY_STRING']</a></var> is filled with the passed
    query string. The query string may only be passed when using Apache 2.
    The requested file will not be listed in the Apache access log.
   </p>
  </div>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    Environment variables set in the requested file are not visible to the
    calling script.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    This function may be used on PHP files. However, it is typically better
    to use <span class="function"><a href="function.include.php" class="function">include</a></span> or <span class="function"><a href="function.require.php" class="function">require</a></span> for
    PHP files.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.virtual-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.apache-note.php" class="function" rel="rdfs-seeAlso">apache_note()</a> - Get and set apache request notes</span></li>
   </ul>
  </p>
 </div>


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