I want to write some text from script in browser.
<?php
$out = fopen('php://stdout', 'w');
fprintf($out, "Hello!");
fclose($out);
?>
I expect “Hello!” on output, but nothing happens…Could it be bug in stdout, or I just oversighted something?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This would be true if calling php from console.
But if you are talking about web access, you should use
php://output