powered by simpleCommunicator - 2.0.50     © 2025 Programmizd 02
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / запуск *.exe, *.com, .... приложений на сервере через web???
2 сообщений из 2, страница 1 из 1
запуск *.exe, *.com, .... приложений на сервере через web???
    #32412177
Алек$ей
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
не пинайте сильно. так как я ноль в WEB программинге.
суть надо сделать страничку на которой будет кнопка. нажав кнопку на сервере запустится *.exe, *.com или *.cmd файлик. отработает и закроется (что бы не висел как процес или сервис).
Сервер Win2000
...
Рейтинг: 0 / 0
запуск *.exe, *.com, .... приложений на сервере через web???
    #32412205
MySQLdb
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Да, это можно делать, даже можно
получать результат работы 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> ";
?>
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / запуск *.exe, *.com, .... приложений на сервере через web???
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]