# Calling CGI from PHP?



## vidyaishaya (Oct 27, 2001)

Is there any way to execute a CGI script (in the cgi-bin folder) from a PHP call?

No parameters. Just a straight call to a CGI tracking script.

Thanks

....Vidya

P.S. Maybe exec() or passthru() but then how do I address the CGI script?


----------



## Shadow2531 (Apr 30, 2001)

<?php
virtual("cgi-bin/file.cgi");
?>

should do it.

(assuming you got the path right).

The include and require functions will work, but will just grab the text from the cgi file and not actually execute it.


----------



## vidyaishaya (Oct 27, 2001)

YES! Whee.

That worked like a charm.

Thanks so much.

....Vidya
www.webwisesage.com


----------

