|
запуск *.exe, *.com, .... приложений на сервере через web???
|
|||
---|---|---|---|
#18+
не пинайте сильно. так как я ноль в WEB программинге. суть надо сделать страничку на которой будет кнопка. нажав кнопку на сервере запустится *.exe, *.com или *.cmd файлик. отработает и закроется (что бы не висел как процес или сервис). Сервер Win2000 ... |
|||
:
Нравится:
Не нравится:
|
|||
17.02.2004, 15:28 |
|
запуск *.exe, *.com, .... приложений на сервере через web???
|
|||
---|---|---|---|
#18+
Да, это можно делать, даже можно получать результат работы exe$com....... смотри функции PHP: авторexec Execute an external program (PHP 3, PHP 4 ) string exec ( string command [, array output [, int return_var]] ) exec() executes the given command, however it does not output anything. It simply returns the last line from the result of the command. If you need to execute a command and have all the data from the command passed directly back without any interference, use the passthru() function. If the output argument is present, then the specified array will be filled with every line of output from the command. Line endings, such as \n, are not included in this array. Note that if the array already contains some elements, exec() will append to the end of the array. If you do not want the function to append elements, call unset() on the array before passing it to exec(). If the return_var argument is present along with the array argument, then the return status of the executed command will be written to this variable. авторWarning: If you are going to allow data coming from user input to be passed to this function, then you should be using escapeshellarg() or escapeshellcmd() to make sure that users cannot trick the system into executing arbitrary commands. авторПингуем хост <META http-equiv="Refresh" content="3"> <?php $str=exec("ping -c 1 -w 1 192.168.1.216",$a,$a1); print "<table>"; if(strlen($str)>1){ print"<tr><td bgcolor='#fff000'>present</td></tr>"; }else{ print"<tr><td bgcolor='#000000'>Not present</td></tr>"; } print "</table> "; ?> ... |
|||
:
Нравится:
Не нравится:
|
|||
17.02.2004, 15:37 |
|
|
start [/forum/topic.php?fid=23&msg=32412205&tid=1480065]: |
0ms |
get settings: |
9ms |
get forum list: |
12ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
31ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
46ms |
get tp. blocked users: |
2ms |
others: | 11ms |
total: | 135ms |
0 / 0 |