pipe - Different output with php client and with a browser -
maybe question simple, i'm not able answer it.
i have little php code:
<?php $line="echo 'hello' | lpr -pmyprinter"; $out=system($line,$output); ?>
when execute code using command line (i use linux php 5.3.6 , apache 2.2.17) it's printed 'hello' in myprinter.
if execute code using browser looks pipe ignored!
i have tried exec(), passthru(), etc. , results same.
thanks help.
p.s: ran code php 5.1.¿¿??
try using following:
echo `echo hello | lpr -pmyprinter`
Comments
Post a Comment