php exec() help needed

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
comeragh
Forum Newbie
Posts: 1
Joined: Tue Mar 11, 2008 11:18 am

php exec() help needed

Post by comeragh »

Hi,
does anyone know why this wouldn't work. Everything seems in order but nothing happens.

function runCluto()
{
$command = "Z:\public_html\foldername\RunCluto.bat";
exec($command);
}
Tnx :)
anto91
Forum Commoner
Posts: 58
Joined: Mon Mar 10, 2008 10:59 am
Location: Sweden

Re: php exec() help needed

Post by anto91 »

I think the bat file must be in the same directory as the php script (not sure ant played with bat in a long long time), also i think you should try exec('start '. $file);
Post Reply