can PHP call an executable?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
permutations
Forum Commoner
Posts: 52
Joined: Sat Dec 07, 2002 11:45 am

can PHP call an executable?

Post by permutations »

I want to write a Web app that collects user data from a form, passes it to a scripting language on the server which in turn calls an EXE with the use-entered data, then when the EXE returns its calculations (from the user data), I'd like the scripting language to format the calculations for display by the client (the browser). Can PHP do this? As far as I can tell, PHP can't call an EXE, and that's a problem. What scripting language could I use for this?

Thanks in advance.
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

Sure it can, look into exec, or system...
permutations
Forum Commoner
Posts: 52
Joined: Sat Dec 07, 2002 11:45 am

Post by permutations »

For some reason, the huge PHP book I have hardly mentions these functions. Thanks for pointing them out.
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Post by oldtimer »

I had to do the same thing. I wanted to call up htpasswd instead of writing to a file. I used system(). PHP.net search for system helped me out alot.
Post Reply