Reply to Re: How do you do TCL exec command on PHP script that uses user input?

Your name:

Reply:


Posted by comp.lang.tcl on 11/03/76 11:32

I'm sorry but I do not understand. This is not an error. This is the
correct result of the user entering just the carriage return instead of
a string text value. Ok, "user error" if that makes sense, not "script
error"

Phil
Ulrich Schöbel wrote:
> Hi Phillip,
>
> soory, I didn't follow the entire thread. From your description
> I'd derive something like
>
> if {[catch {exec php ...........} error]} {
> puts stderr $error
> exit 1
> }
>
> Then the Tcl script commits suicide on the death of your php script.
>
> Best regards
>
> Ulrich
>
> In article <1132585996.564652.204510@g49g2000cwa.googlegroups.com>,
> "comp.lang.tcl" <phillip.s.powell@gmail.com> writes:
> > The behavior I want is to reflect the behavior of the called PHP
> > script.
> >
> > You will input some data. If you do NOT input some data (such as hit
> > "Enter" instead of entering data), it will throw an error message and
> > die. If you just sit there and enter nothing, it just sits there and
> > does nothing until you enter something.
> >
> > That is how the PHP script works, which I will spare you from having to
> > view PHP code to verify.
> >
> > The problem is that the TCL script, while it now successfully pipes in
> > stdout and stderr, doesn't pipe in "exit()", the PHP function that
> > reflected as such:
> >
> > [PHP]
> > if (!$response) die('You must enter a username');
> > [/PHP]
> >
> > Instead TCL just moves on to the next statement, instead of just dying
> > at that spot.
> >
> > Phil
> >
> > Cameron Laird wrote:
> >> In article <1132452443.558092.275200@g14g2000cwa.googlegroups.com>,
> >> comp.lang.tcl <phillip.s.powell@gmail.com> wrote:
> >> .
> >> .
> >> .
> >> >Problem is that the PHP script contains an exit() function that dies if
> >> >user does not input something upon prompting. The TCL script does not
> >> >die, it keeps going, which is not the desired effect, but hey I'm
> >> >halfway there already, thanx!!
> >> .
> >> .
> >> .
> >> You're welcome.
> >>
> >> Why is it a "[p]roblem ... that the PHP script contains
> >> an exit() function that dies ..."? What sort of behavior
> >> do you want? Do you want your Tcl script to undo this
> >> setting? Are you saying that you want the Tcl coding to
> >> allow user input, but to pass some default response
> >> through to PHP if the user "times out"? Or are you saying
> >> that you want to Tcl script to notice when the PHP one has
> >> "died", and itself exit?
> >

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация