mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 20:08:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166707 c90b9560-bf6c-de11-be94-00142212c4b1
66 lines
2.4 KiB
XML
66 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.10 $ -->
|
|
<!-- splitted from ./en/functions/apache.xml, last change in rev 1.20 -->
|
|
<refentry id="function.virtual">
|
|
<refnamediv>
|
|
<refname>virtual</refname>
|
|
<refpurpose>Perform an Apache sub-request</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>virtual</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>virtual</function> is an Apache-specific function which
|
|
is equivalent to <!--#include virtual...--> in mod_include.
|
|
It performs an Apache sub-request. It is useful for including
|
|
CGI scripts or .shtml 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 Content-type header.
|
|
</para>
|
|
<para>
|
|
To run the sub-request, all buffers are terminated and flushed to the
|
|
browser, pending headers are sent too.
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
This function works only when PHP is compiled as an Apache module,
|
|
since it uses the Apache API for doing sub requests. Query string can be
|
|
passed to the included file but <varname>$_GET</varname> is copied from
|
|
the parent script and only <varname>$_SERVER['QUERY_STRING']</varname> 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.
|
|
</para>
|
|
</warning>
|
|
<para>
|
|
As of PHP 4.0.6, you can use <function>virtual</function> on PHP files.
|
|
However, it is typically better to use <function>include</function> or
|
|
<function>require</function> if you need to include another PHP file.
|
|
</para>
|
|
¬e.apache.nsapi-module;
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|