Forum Moderators: coopster
$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!
If not you may use really all of these functions. Only remember, that you are executing them as the user apache!
echo shel_exec("ps -ax");
Best regards
Michal Cibor
However be VERY careful while passing GET value into the exec functions, as it may be really harmful to your system!
As far as I know, it is a wise thing to reduce the amount of system() or exec() calls to a minimum. Seems to me what you are trying to do can be done with simple readfile() function calls etc
but then again, I might be wrong
hmmpfam [file in hard disk] [data submitted]
and the algorithm searches the [file in hard disk] for patterns that match the [data submitted].
That's why I can't find another way to do it...
Do you think it would help if I did anything with Perl? A kind of CGI-script?
Here you can find a simple search script
[onlamp.com...]
Best regards
Michal Cibor
hmmpfam.exe [file] [user data]
I only need to 'tell' the hmmpfam program to start running, using the [user data]..