Executing unix shell commands using PHP -


a text box used capture command. i've been told have use exec() function execute unix shell commands.

something this, user types ls in text box. exec() function execute unix command , command displayed on web page.

what want know how output of shell command , display in web browser using php.

i don't know start since i'm new php.

i'm using ubuntu.

you start looking @ php manual:

system program execution

but sdleihssirhc mentioned, watchout dangerous , should not allow executed!
if still want it, output of shell, use

exec
output of shell passed in second parameter.

e.g.:

exec('ls -la', $outputarray); print_r($outputarray); 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -