<!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>Perform an NSAPI sub-request</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.nsapi-response-headers.html">nsapi_response_headers</a></div> <div class="next" style="text-align: right; float: right;"><a href="refs.basic.session.html">Session Extensions</a></div> <div class="up"><a href="ref.nsapi.html">NSAPI Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.nsapi-virtual" class="refentry"> <div class="refnamediv"> <h1 class="refname">nsapi_virtual</h1> <p class="verinfo">(PHP 4 >= 4.3.3, PHP 5)</p><p class="refpurpose"><span class="refname">nsapi_virtual</span> — <span class="dc-title">Perform an NSAPI sub-request</span></p> </div> <div class="refsect1 description" id="refsect1-function.nsapi-virtual-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>nsapi_virtual</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span> )</div> <p class="para rdfs-comment"> <span class="function"><strong>nsapi_virtual()</strong></span> is an NSAPI-specific function which is equivalent to <em><!--#include virtual...--></em> in <acronym>SSI</acronym> (<var class="filename">.shtml</var> files). It does an NSAPI sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you'd parse through webserver. </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="para"> You cannot make recursive requests with this function to other PHP scripts. If you want to include PHP scripts, use <span class="function"><a href="function.include.html" class="function">include</a></span> or <span class="function"><a href="function.require.html" class="function">require</a></span>. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> This function depends on a undocumented feature of the Netscape/iPlanet/Sun webservers. Use <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span> to determine if it is available. In the Unix environment it should always work, in Windows it depends on the name of a <var class="filename">ns-httpdXX.dll</var> file. </p> <p class="para"> Read the note about subrequests in the NSAPI section (<a href="install.unix.sun.html#install.unix.sun.notes" class="link">UNIX</a>, <a href="install.windows.sun.html#install.windows.sun.notes" class="link">Windows</a>) if you experience this problem. </p> </p></blockquote> </div> <div class="refsect1 parameters" id="refsect1-function.nsapi-virtual-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">uri</code></em></span> <dd> <p class="para"> The URI of the script. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.nsapi-virtual-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><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.nsapi-response-headers.html">nsapi_response_headers</a></div> <div class="next" style="text-align: right; float: right;"><a href="refs.basic.session.html">Session Extensions</a></div> <div class="up"><a href="ref.nsapi.html">NSAPI Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>