FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Detecting Redirected Output
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Detecting Redirected Output [message #174109] Sun, 22 May 2011 01:06 Go to previous message
Bob Smith is currently offline  Bob Smith
Messages: 11
Registered: October 2010
Karma:
Junior Member
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?

--
_________________________________________
Bob Smith -- bsmith(at)sudleydeplacespam(dot)com

To reply to me directly, delete "despam".
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: populate pulldownbox from query
Next Topic: You have an error in your SQL syntax;
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Oct 19 22:26:44 GMT 2024

Total time taken to generate the page: 0.06052 seconds