executing an exe that's in another directory
Posted: Sun Apr 18, 2004 4:43 am
Hi there,
well i'm pretty noob with php, and i was trying to execute an .exe (or a .bat, I suppose it's the same) file from a php script. If the .exe and the .php files are in the same directory this code works well:
exec("program.bat ".$param1." ".$param2);
But if i try to execute /bin/program.bat like this:
exec("./bin/program.bat ".$param1." ".$param2);
it doesn't work. In my case, it's a program that creates some html files depending on the parameters given, and it doesnt produce any output at the screen.
But the files aren't created, so the file doesnt execute, what shall i do?
Thanks a lot
EDIT: Oh yeah, sorry, i've already had that in my script, but i forgot to put it in this post.
It doesnt work either. 
well i'm pretty noob with php, and i was trying to execute an .exe (or a .bat, I suppose it's the same) file from a php script. If the .exe and the .php files are in the same directory this code works well:
exec("program.bat ".$param1." ".$param2);
But if i try to execute /bin/program.bat like this:
exec("./bin/program.bat ".$param1." ".$param2);
it doesn't work. In my case, it's a program that creates some html files depending on the parameters given, and it doesnt produce any output at the screen.
But the files aren't created, so the file doesnt execute, what shall i do?
Thanks a lot
EDIT: Oh yeah, sorry, i've already had that in my script, but i forgot to put it in this post.