Page 1 of 1

Run command-line through PHP

Posted: Thu Sep 25, 2008 5:44 am
by armadillo
I need to do some command lines through a browser. What I need to do in a command-line would be:

Code: Select all

 
$login
<login name>
<password>
$passwd
<old password>
<new password>
<retype new password>
 
I've tried doing this with "shell_exec" but it doesn't work (because I need to input 5 parameters in the command-line.
So, how can I do this?

Thanks

Re: Run command-line through PHP

Posted: Thu Sep 25, 2008 10:59 am
by Christopher
You can have as may parameters as you want. The exec functions are passed a string.

http://us2.php.net/manual/en/book.exec.php