As the title mentions i want to execute a .cgi file (a perl script) through a php script. I want also to pass some arguments to the cgi script.
use [man]exec[/man] to call the PERL executable and pass the CGI script command line argument.
what about to execute the .cgi as url.
i.e. http://server/script.cgi
and the pass the arguments?
Run exec to wget and make it load the cgi!
😃
This is actually how I exec PHP based crontab scripts.... 🙂
so you mean
exec("wget http://server/script.cgi"); exec("/script.cgi");
don't you?
use vitual if your running under apache
other wise you may be able to use include orfile_get_contents
with the last two you will need to use the full url
Originally posted by dominant so you mean exec("wget http://server/script.cgi"); exec("/script.cgi"); don't you?
Like this:
exec("wget http://www.yoursite.com/yourfile.cgi --delete-after");
Try that out.
-Sys