Hi,
i want to operate a given shell-script dialog with PHP.
Has anyone successfully ever tried this?
played with proc_open, but could not get the browser to show the question, on which a choice could be made.
??with a form and passing the pipes????
This is my test-script:
#! /bin/bash
#----------------------------------------------------------------------------
/var/DlgTest- test script for PHP-Dialog
#
#----------------------------------------------------------------------------
ask ()
{
while [ 1 ]
do
echo -e "$1 (y/n)? \c"
read a
case "$a"
in
y | yes) a=y; break;;
n | no) a=n; break;;
*)
echo "Please answer y(es) or n(o)!"
;;
esac
done
}
echo
echo "Test Dialog" gn
some text
echo
echo "i played with proc_open"
echo "but could not get display this text before making the choice"
echo
required input
ask "Now make a choice y/n ?"
answer
if [ "$a" = "y" ]
then
echo "you typed yes"
else
echo "you typed no"
fi
thanks for help