View previous topic :: View next topic |
Author |
Message |
Salkin -
Joined: 07 Oct 2007 Posts: 1
|
Posted: Sun Oct 07, 2007 6:00 pm Post subject: Possibility to execute applications on the server |
|
|
Hi!
I'm currently running abyss using PHP and another kind of file server for myself and friends when i am not home. Its fairly simple enough but the thing i really would like to do is execute a program on the server.
I have no idea how this would be possible to do, for example start notepad.exe on the server computer when someone sends a PHP or MySQL Query for example. I am not very good at PHP and have only written Visual Basic 6 on hobby levels.
If anyone has any ideas how this might be accomplished using plugins or third party applications or simply a function within Abyss I would be very grateful!
Regards Salkin _________________
|
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Oct 08, 2007 3:38 am Post subject: |
|
|
You can execute shell commands in PHP, using a few functions. exec() is one of the functions you can use. |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Mon Oct 08, 2007 4:41 am Post subject: |
|
|
I'll give you a short lesson.
If you want to get output of a command line app, use shell_exec().
If you just want to execute a program, use exec().
If you want to get the output of a command line app and directly output it (with no ability to manipulate that output), use system().
It sounds like me you want to use exec(). Try:
Code: | <?php
exec('notepad');
?> |
_________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1300
|
|
Back to top |
|
|
|