Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PERL <!--#exec cgi= in PHP !!

Status
Not open for further replies.

Vesku

Programmer
Jun 7, 2000
19
0
0
FI
Hi !

I have in Unix-system SHTML -document with <!--#exec cgi=&quot;/cgi-bin/news/news.cgi&quot;--> command. How can i do that same thing in PHP -document ?


Thx !
 
I think this might work:

<!--#exec file=&quot;file.php&quot;-->

Hope this helps.

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Are you tring to SSI a php script into an SHTML document or parse a cgi script into a PHP document?

To SSI a php script into a SHTML doc:
<!--#include virtual=&quot;/path/to/php/script.php&quot;-->


To parse a cgi into a PHP script:
<?
virtual (&quot;/cgi-bin/news/news.cgi&quot;);
?>

These only work with Apache (since the virtual is an Apache command). For other web servers I think you would have to use the <!--#exec file=&quot;file.php&quot;--> for the SSI php in an SHTML ... and
<?
include(&quot;?>
to parse a cgi into a PHP script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top