Re: include virtual, file or exec cgi?
| From: | Wizaerd) | Date: | Wed, 21 Mar 2001 19:55:56 +0000 |
| Subject: | Re: include virtual, file or exec cgi? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44990@lists.php.net to get a copy of this message | ||
virtual (PHP 3, PHP 4 )
Perform an Apache sub-request
int virtual (string filename)
Virtual() 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. For PHP files, you need to use include() or require(); virtual() cannot be used to
include a document which is itself a PHP file.
At 04:50 PM 3/21/01 -0300, Christian Dechery wrote:
When I first started playing with PHP I had been using SSI's. I tried to find a way that I could get a file that contained SSI's and php to be parsed, but I haven't seen it done. In Apache it seems like it would be as easy as adding a handler that parses shtml files as php files, but that causes the SSI and/or the PHP parser not to run. so... what you're saying is that I can't have a PHP file <#--include-->'ed in a regular server parsed html file? it doesn't work? I can have included C and Perl stuff but not PHP? Well I gotta tell ya, that sucks! :(. [ Christian Dechery ]. Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net