note 20329 added to function.shell-exec
| From: | tonysb at gmx dot net | Date: | Sat, 30 Mar 2002 17:57:38 +0000 |
| Subject: | note 20329 added to function.shell-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28410@lists.php.net to get a copy of this message | ||
shell_exec is extremely useful as a substitute for the virtual() function where unavailable
(Microsoft IIS for example). All you have to do is remove the content type string sent in the
header:
<?
$mstrng = shell_exec('yourcgiscript.cgi');
$mstrng = ereg_replace( "Content-type: text/html", "", $mstrng );
echo $mstrng;
?>
This works fine for me as a substitute for SSI or the virtual() func.
Anton Babadjanov
http://www.vbcn.com.ar
--
http://www.php.net/manual/en/function.shell-exec.php
http://master.php.net/manage/user-notes.php?action=edit+20329
http://master.php.net/manage/user-notes.php?action=delete+20329
http://master.php.net/manage/user-notes.php?action=reject+20329