Posted by Uwe Klein on 12/01/06 17:11
comp.lang.tcl wrote:
> [TCL]
>
> set php {<? print_r("Hello World"); ?>}
> puts $php; # PRINTS OUT <? print_r("Hello World"); ?>
> puts [exec "echo '$php' | php -q"]
puts [exec echo $php | php -q ]
you might have even more fun with
exec php -p <<$php
>
> [/TCL]
>
> When I try this within TCL I get the following error:
>
> [quote]
> echo "": No such file or directory
> [/quote]
>
> I am unable to be able to use the CLI PHP "php -r" option due to my PHP
> installations on various servers being CGI and not CLI SAPI, else, I
> would just do that, so I'm trying an alternative that is choking TCL.
>
> I am using a very simple example within the TCL $php variable; the
> actual contents of $php will be a bit more complex and dynamic,
> however, it's still choking on the simple PHP content.
>
> So how on earth do I get TCL and PHP to play nice?
>
> Thanx
> Phil
uwe
>
[Back to original message]
|