From de1ceb1303b1e8cfd5f01a0a99641cdc79737980 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Sat, 9 Feb 2002 23:44:43 +0000 Subject: [PATCH] Closes bug #14621. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@69865 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 56023b64c5..42b0fd61f4 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2348,7 +2348,7 @@ html fputs. - If an error occurs, returns &false;. + If an error occurs, returns &false;. @@ -2359,6 +2359,29 @@ $fp = popen ("/bin/ls", "r"); + + + If the command to be executed could not be found, a valid + resource is returned. This may seem odd, but makes sense; it + allows you to access any error message returned by the shell: + + +&1', 'r'); +echo "'$fp'; " . gettype($fp) . "\n"; +$read = fread($fp, 2096); +echo $read; +pclose($fp); +?> +]]> + + + + See also pclose.