note 70581 added to function.popen

From: Date: Fri, 20 Oct 2006 23:21:57 +0000
Subject: note 70581 added to function.popen
Groups: php.notes 
Request: Send a blank email to php-notes+get-118875@lists.php.net to get a copy of this message
Note that under Windows, if you are trying to write data to be available to your pipe's STDIN, you may need to execute php directly, rather than depending on file associations. <? // with $cmd set to 'foo.php', STDIN comes up blank. // with $cmd set to 'php foo.php', STDIN gets filled // (assuming php.exe is in your path) $cmd = 'foo.php'; if ( ($fh = popen($cmd, 'w')) === false ) die("Open failed: ${php_errormsg}\n"); fwrite($fh, "Line one\nLine two\n"); pclose($fh); ?> ---- Server IP: 66.207.199.35 Probable Submitter: 68.149.19.75 ---- Manual Page -- http://www.php.net/manual/en/function.popen.php Edit -- https://master.php.net/note/edit/70581 Del: integrated -- https://master.php.net/note/delete/70581/integrated Del: useless -- https://master.php.net/note/delete/70581/useless Del: bad code -- https://master.php.net/note/delete/70581/bad+code Del: spam -- https://master.php.net/note/delete/70581/spam Del: non-english -- https://master.php.net/note/delete/70581/non-english Del: in docs -- https://master.php.net/note/delete/70581/in+docs Del: other reasons-- https://master.php.net/note/delete/70581 Reject -- https://master.php.net/note/reject/70581 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118875) next »