Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #1765

Re: Detecting Redirected Output

From "Twayne" <nobody@devnull.spamcop.net>
Newsgroups comp.lang.php
Subject Re: Detecting Redirected Output
Date 2011-05-22 09:04 -0400
Organization A noiseless patient Spider
Message-ID <irb1l1$7sq$1@dont-email.me> (permalink)
References <c7idnTS_Udwd_EXQnZ2dnUVZ_jKdnZ2d@giganews.com> <ir9v2l$rnv$2@dont-email.me>

Show all headers | View raw


In news:ir9v2l$rnv$2@dont-email.me,
Jerry Stuckle <jstucklex@attglobal.net> typed:
> On 5/21/2011 9:06 PM, Bob Smith wrote:
>> Running under Win7, a script I'm writing needs to vary
>> its behavior depending upon whether or not the output
>> from PHP is being redirected. That is, I want to know
>> from within the PHP script whether it's called as php foo.php
>>
>> or
>>
>> php foo.php > outfile
>>
>> None of the Output Control Functions appears to be
>> helpful. Way back in DOS days, there was an IOCTL call which the
>> program could use to distinguish those two cases. Is
>> there anything comparable in PHP?
>
> Nope.  Not possible in PHP.  And it shouldn't be, either.
> The purpose of a redirect is to be able to save the
> output.

So says the exalted high troll of the newsgroups whose only intent in life 
is to issue meaningless and uncalled for criticisms in order to make up for 
his own lack of power by stealing it from others.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Detecting Redirected Output Bob Smith <bsmith@sudleydeplacespam.com> - 2011-05-21 21:06 -0400
  Re: Detecting Redirected Output Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 23:14 -0400
    Re: Detecting Redirected Output "Twayne" <nobody@devnull.spamcop.net> - 2011-05-22 09:04 -0400
  Re: Detecting Redirected Output Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-22 13:06 +0200
    Re: Detecting Redirected Output Bob Smith <bsmith@sudleydeplacespam.com> - 2011-05-22 12:17 -0400

csiph-web