PDA

View Full Version : Call script or program from PHP?


Timm
11-05-02, 13:40
Is it possible to call a script from PHP? Better still, can PHP be used to call a COBOL program if the program is resides in the same UNIX environment as the web page?

Thanks!

Tim

Mulligan
11-06-02, 09:43
Look into the exec() and similar functions. You can use it to execute a shell script or system command: so in theory, anything you can add to a shell script, you can execute from PHP.

It's a little dangerous however, and I didn't recommend you did it if someone manages to sneak rm -r /* into the script ;)