This is a discussion on "Execute external program via PHP" within the PHP Forum section. This forum, and the thread "Execute external program via PHP are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Execute external program via PHP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Execute external program via PHP
Hi all,
I need to execute a command-line program through PHP. I have a form which includes a textarea, where the user writes his data. These data will be used as input for the commend-line program. Will I go something like: $data = $_GET['info']; Which function shall I use? System, exec, shell_exec, passthru? I can't choose which one is the correct. By the way, the command which I use when I write the script in the command line is : program_name [argument1 -> A database file] [argument2 -> info supplied by user] So, in the function that will be used, the data supplied by the user will be passed as my second argument (the 1st argument is a file in my hard disk). And, lastly, do I need to change any global settings for PHP in order to perform such actions, ie running scripts via PHP programs??? Thanx a lot! |
|
|
|
|||
![]() |
| Tags |
| execute, external, program, via, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Asp to execute a command in a .exe file | Andrew1986 | Classic ASP | 7 | Jan 11th, 2008 09:44 |
| open an external program | Rothers2005 | Flash & Multimedia Forum | 1 | Apr 18th, 2007 16:39 |
| SSI, server.execute and Global variables | D3mon | Classic ASP | 5 | May 8th, 2004 09:50 |
| server.execute error..help me | tulip4heaven | Classic ASP | 2 | Apr 26th, 2004 17:59 |