...

View Full Version : Including Perl in PHP



StuartS
12-29-2006, 01:17 PM
Hello,

I am trying to call a cgi file from within a PHP file. To do this I am using:

---------------
virtual ('/cgi-bin/test.cgi');
---------------

This works but the code that test.cgi produces is being shown at the top of the page and not in the place were it is being called from!

The code that test.cgi produces is:
---------------
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="468">
<TR>
<TD WIDTH="100%">
<A HREF="/cgi-bin/click.cgi?account=EL" TARGET="_blank"><IMG SRC="http://www.mydomain.com/images/banner/el.gif" BORDER="0" HEIGHT="60" WIDTH="468" ALT="EL"></A>
</TD>
</TR>
</TABLE>
---------------

Can you help?

Many thanks,

Stuart.

mlseim
12-29-2006, 02:40 PM
Have you tried using "include" instead of "virtual"?

include ("./cgi-bin/test.cgi");

just curious.

firepages
12-30-2006, 01:38 AM
from the manual

To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too.

one workaround might be to include('callcgi.php'); where callcgi.php will itself do the virtual() call, not sure if that would work but its worth a try ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum