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


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