mithilesh
11-26-2001, 06:16 PM
I have written an script in perl and make it executable( using chmod +x file name). Now I want to call this file in my PHP script which is running on my website.
Can you help me for this by writing the proper function or code.I want to say thanks in advance for your help.
Thank you
(SH)Saeed
11-26-2001, 08:09 PM
//Execute an external program
$var = exec("/path/to/file.pl");
//Execute an external program and display raw output
$var = passthru("/path/to/file.pl");
Hope this helps..
mithilesh
11-26-2001, 08:58 PM
what do you want to say by /to . one more thing my script hasn't any extension. It has name simply mithacct.But for running this file I type the command ./mithacct within the directory where it exist.
bitserve
11-27-2001, 12:50 AM
"to" translates to "foo". Replace it with a real value for the "path to" the CGI.
bobcares
11-27-2001, 02:58 AM
Hi!
There is another function called system
Given below is the description from php.net
system -- Execute an external program and display output
Description
string system (string command [, int return_var])
I hope this helps .
Have a great day :)
Regards
Amar