[Phpwm] Fnuction to calculate a formula
Greg Jones
greg.jones at gmail.com
Tue Dec 4 19:23:46 GMT 2007
On Tue, 04 Dec 2007 18:53:59 -0000, Colin Taylor
<colin.taylor at btclick.com> wrote:
> For info, I finally settled on:
>
> $command="/usr/local/bin/php -r \"echo \"2+2\";\"";
> $res=exec($command);
>
> Seems to do the trick.
> Now to find a dictionary to find out how to spell "Fnuction".
> Cheers,
> Colin
>
There isn't really an benefit to doing that over using eval(), both leave
you open to exploits if it's user-data being processed, but using exec
will spawn a new php process, and potentially leaves the shell as well as
PHP itself open to exploitation.
Greg
More information about the Phpwm
mailing list