Re: works in tclsh but fails in CGI
- From: "comp.lang.tcl" <phillip.s.powell@xxxxxxxxx>
- Date: 3 Dec 2006 23:15:02 -0800
Bryan Oakley wrote:
comp.lang.tcl wrote:
% set hasError [catch [exec <? print_r("Hello World"); ?> | php -q]
result]
couldn't read file "?": no such file or directory
Totally expected; < has special meaning to exec.
% set hasError [catch [exec {<? print_r("Hello World"); ?> | php -q}]
result]
couldn't read file "? print_r("Hello World"); ?> | php -q": no such
file or dire
ctory
Totally expected. Exec expects the first word to be the name of a file
to exec. Unless your system has a file named '? print_r("Hello World");
>| php -q' you will get the above error.
% set hasError [catch "exec <? print_r("Hello World"); ?> | php -q"
result]
extra characters after close-quote
Yes. You do not escape the double-quotes-within-double quotes.
You'll unfortunately have to show me exactly how to do it, the right
way. I just am not processing this.
I've shown you exactly how to do it at least a couple of times. But,
what the heck:
set phpscript {<? print_r("Hello World");>?}
exec php << $phpscript
Thanx that was exactly what I needed, that, of course worked!
Phil
.
- References:
- [catch] works in tclsh but fails in CGI
- From: comp.lang.tcl
- Re: works in tclsh but fails in CGI
- From: comp.lang.tcl
- Re: works in tclsh but fails in CGI
- From: Bryan Oakley
- Re: works in tclsh but fails in CGI
- From: comp.lang.tcl
- Re: works in tclsh but fails in CGI
- From: Bryan Oakley
- [catch] works in tclsh but fails in CGI
- Prev by Date: Re: works in tclsh but fails in CGI
- Next by Date: Re: my first Tck/Tk program... and an XML question
- Previous by thread: Re: works in tclsh but fails in CGI
- Next by thread: Re: works in tclsh but fails in CGI
- Index(es):