September 25, 2005

Learing the difference between php://output and php://stdout

it took me way too long to figure out the difference between php://ouput and php://sdtout. looking at the wrappers page it seems like they both should do the same thing. you can run this little script to see the difference.
<?php
$fo = fopen('php://output', 'w');
$fs = fopen('php://stdout', 'w');

fputs($fo, "You can see this with the CLI and Apache.\n");
fputs($fs, "This only shows up on the CLI...\n");

fclose($fo);
fclose($fs);
?>
Posted by drewish at September 25, 2005 01:03 AM

Trackback Pings

TrackBack URL for this entry:
http://drewish.com/mt/mt-tb.cgi/1384

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?


Creative Commons License xml feed