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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -