exec() to execute bat file.

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
sobha
Forum Commoner
Posts: 56
Joined: Wed Jul 15, 2009 9:08 pm

exec() to execute bat file.

Post by sobha »

Hi

I used echo exec('C:/start.bat'); to execute the batch file.But it is not showing the output.

Please help.

Regards,
Sobha
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: exec() to execute bat file.

Post by requinix »

Creating a thread every time your question changes a little bit is really annoying.

exec
Return Values

The last line from the result of the command.
Oftentimes on Windows there's a final blank line after a program executes...
sobha
Forum Commoner
Posts: 56
Joined: Wed Jul 15, 2009 9:08 pm

Re: exec() to execute bat file.

Post by sobha »

I used echo exec('C:/start.bat'); to execute the batch file.But it is not showing the output.
But just displaying a blank page.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: exec() to execute bat file.

Post by requinix »

Lemme try again.
tasairis wrote:Creating a thread every time your question changes a little bit is really annoying.

exec
Return Values

The last line from the result of the command.
Oftentimes on Windows there's a final blank line after a program executes...
Post Reply