Hi I am a Newbie to the forum.
Is it possible to run a UNIX shell script that requires input from users in a PHP page?
Does anyone have an example or tutorial.
I am familiar with system(), passthru, and shell_exec.
Suppose I ran a UNIX shell script (change_date.sh) in UNIX .
The script will prompt user to enter new date. (User enters date)
Afterward, ask user are you sure you want to change date. (User enters Y or N)
How do I call change_date.sh in my PHP page to do the same thing?
Thanks
UNIX Shell Scripts that requires input from user in PHP
Moderator: General Moderators
-
dpittman36
- Forum Newbie
- Posts: 2
- Joined: Wed Sep 01, 2010 5:15 pm
Re: UNIX Shell Scripts that requires input from user in PHP
yes, possible, but you need to open a pipe to the process. see php function popen().
-
dpittman36
- Forum Newbie
- Posts: 2
- Joined: Wed Sep 01, 2010 5:15 pm
Re: UNIX Shell Scripts that requires input from user in PHP
Any good tutorial sites you can recommend?
I still cannot find anything similiar to what I am looking for.
Thanks
I still cannot find anything similiar to what I am looking for.
Thanks