Hi,
I am new at PHP programing and i have not so much experience with PHP, my problem is like that i wrote few Shell Script that have to work on CentOS,i already configured the Apache Server but is it any possibility to make a simple PHP script or page that can execute the scripts and show me the output of the scripts on the PHP page.
I thought it like this to have a button and a text filed if i press the button it should execute the script and show the output of the script on the text filed.
The second thing is it possible to enter something on the text filed and if i press the button to add the text after the script (for example ./script.sh field text) and execute the script.
As i said i have no experience on php, I hope that someone can help me with a short example code.
Thanks in advance.
linux Scripts and php
Moderator: General Moderators
Re: linux Scripts and php
Take a look at:
system()
passthru()
escapeshellcmd()
backtick operator
exec()
shell_exec ()
system()
passthru()
escapeshellcmd()
backtick operator
exec()
shell_exec ()
There are 10 types of people in this world, those who understand binary and those who don't
Re: linux Scripts and php
thanks for you help but i really don't understand that. Maybe someone has a sample code?
tahnks
tahnks
Re: linux Scripts and php
There are a *lot* of sample code snippets in the manuals of the functions I've pointed to in my previous post.
There are 10 types of people in this world, those who understand binary and those who don't