Run a program rdp by a PHP application

Asked

Viewed 129 times

1

You could run a program rdp through a php site ?

tried

echo exec("start \\192.168.1.233\Teste\Apps\BRAVOS.rdp") or die("ERROU");

and

system("\\192.168.1.233\Teste\Apps\BRAVOS.rdp");

more just carega and back to the page I called the command the application does not open.

it is possible to open in this way?

1 answer

2


You can create a . bat file by pointing to your program. In PHP, use this code:

$handle = popen('meu_bat.bat', 'r');
$read = fread($handle, 2096);
pclose($handle);

And within the meu_bat.bat place the call to your program:

START MEU_PROGRAMA.EXE

Popen font

  • 1

    good when placing $Handle = popen('bravos.bat', 'r'); $read = fread($Handle, 8192); pclose($Handle); in a php file to open and only point a link to it correct ? because when I run bat the program opens more when I point to a file where it contains the above code nothing occurs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.