September 2001
Intermediate to advanced
768 pages
32h 45m
English
int virtual(string URI) Performs an Apache subrequest to parse and include a file.
Returns:
TRUE if successful; FALSE on error
Description:
This function enables you to perform an Apache subrequest. It performs the same function that mod_include allows you to perform (<!--#include virtual...-->) , but you can access the feature from within PHP scripts. This is useful if you want to include the output of a CGI script within your PHP file, for example. You can’t use virtual() on PHP files; use include() instead.
Version:
Existing since version 3.0
Warning:
In versions prior to 3.0.13, it was possible to use virtual() on PHP files under some circumstances.
Example:
$script = "/cgi-bin/script.pl"; ... |
Read now
Unlock full access