...

View Full Version : exec() Problems



mic2100
04-24-2006, 12:42 PM
I am trying to execute a .exe file but i keep getting the same problem




$file = "C:\autoDialer.exe";

exec($file);



I don't need any information to be passed to or from this because it only presses the shortcut keys to dial the phone.



Parse error: parse error, unexpected ':' in C:\AppServ\www\SJMDBv2\autoDialer.php on line 3

this is the error i get. I need to know if i am writing this correctly of do i need to use some other functions.

How do i write the string for a windows file location.

XPc
04-24-2006, 03:34 PM
try

$file = "start c:\autodialer.exe";

From what i see exec will run command line programs, Either making you need to have a batch script or write the program for console.

Not 100% sure....

But that should work...

If not then

http://us2.php.net/function.exec

Theres some posts about windows there.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum