I am converting some code from .SHTML to PHP. In SHTML, we can use the following statent to execute a cgi script that resodes om cgi-bin.
<!--#exec cgi="./cgi-bin/banner.cgi" --><!--#exec cgi="./cgi-bin/random.cgi" -->
how can i call the same script using php. I used
<? include "./cgi-bin/banner.cgi";
include "./cgi-bin/random.cgi";
?>
But with no luck
amy sugestions?
thanks
--Quan
Executing a CGI scripts
Moderator: General Moderators
-
PingLeeQuan
- Forum Commoner
- Posts: 58
- Joined: Tue Sep 03, 2002 8:08 am
thanks for your reply... i tried both "system()" and "exec()" but none worked. I also tried passthru() but no luck... the random image is not being displaied and no errors either. I must be doing somthing wrong but i cannot figure it out.
this is what i did
$y="#exec cgi='./cgi-bin/random.cgi'";
passthru ($y);
this is what i did
$y="#exec cgi='./cgi-bin/random.cgi'";
passthru ($y);