From 9c4ae88f499a2fcf3d4a243625705dcfb500d076 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Mon, 13 Jan 2003 02:54:28 +0000 Subject: [PATCH] Use 'handle' instead of 'fp' in parameter declarations and examples. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@111625 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fclose.xml | 10 +++++----- reference/filesystem/functions/feof.xml | 4 ++-- reference/filesystem/functions/fflush.xml | 6 +++--- reference/filesystem/functions/fgetc.xml | 4 ++-- reference/filesystem/functions/fgetcsv.xml | 12 ++++++------ reference/filesystem/functions/fgets.xml | 12 ++++++------ reference/filesystem/functions/fgetss.xml | 4 ++-- reference/filesystem/functions/flock.xml | 6 +++--- reference/filesystem/functions/fopen.xml | 12 ++++++------ reference/filesystem/functions/fpassthru.xml | 8 ++++---- reference/filesystem/functions/fputs.xml | 4 ++-- reference/filesystem/functions/fread.xml | 18 +++++++++--------- reference/filesystem/functions/fscanf.xml | 12 ++++++------ reference/filesystem/functions/fseek.xml | 6 +++--- reference/filesystem/functions/fstat.xml | 4 ++-- reference/filesystem/functions/ftell.xml | 4 ++-- reference/filesystem/functions/ftruncate.xml | 6 +++--- reference/filesystem/functions/fwrite.xml | 12 ++++++------ reference/filesystem/functions/pclose.xml | 4 ++-- reference/filesystem/functions/popen.xml | 12 ++++++------ reference/filesystem/functions/rewind.xml | 4 ++-- reference/filesystem/functions/tempnam.xml | 8 ++++---- 22 files changed, 86 insertions(+), 86 deletions(-) diff --git a/reference/filesystem/functions/fclose.xml b/reference/filesystem/functions/fclose.xml index 5c8c498e3b..bcca3e869d 100644 --- a/reference/filesystem/functions/fclose.xml +++ b/reference/filesystem/functions/fclose.xml @@ -1,5 +1,5 @@ - + @@ -10,10 +10,10 @@ Description boolfclose - resourcefp + resourcehandle - The file pointed to by fp is closed. + The file pointed to by handle is closed. &return.success; @@ -30,9 +30,9 @@ ]]> diff --git a/reference/filesystem/functions/feof.xml b/reference/filesystem/functions/feof.xml index 5dfa7e1a83..fb1dbfdcd8 100644 --- a/reference/filesystem/functions/feof.xml +++ b/reference/filesystem/functions/feof.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description boolfeof - resourcefp + resourcehandle Returns &true; if the file pointer is at EOF or an error occurs; diff --git a/reference/filesystem/functions/fflush.xml b/reference/filesystem/functions/fflush.xml index 788d5b8cd8..f2affbd11b 100644 --- a/reference/filesystem/functions/fflush.xml +++ b/reference/filesystem/functions/fflush.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,11 @@ Description boolfflush - resourcefp + resourcehandle This function forces a write of all buffered output to the - resource pointed to by the file handle fp. + resource pointed to by the file handle handle. Returns &true; if successful, &false; otherwise. diff --git a/reference/filesystem/functions/fgetc.xml b/reference/filesystem/functions/fgetc.xml index 2af03bf7b5..96a04c3143 100644 --- a/reference/filesystem/functions/fgetc.xml +++ b/reference/filesystem/functions/fgetc.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description stringfgetc - resourcefp + resourcehandle Returns a string containing a single character read from the diff --git a/reference/filesystem/functions/fgetcsv.xml b/reference/filesystem/functions/fgetcsv.xml index ccfe960273..7de6ca4d97 100644 --- a/reference/filesystem/functions/fgetcsv.xml +++ b/reference/filesystem/functions/fgetcsv.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description arrayfgetcsv - resourcefp + resourcehandle intlength stringdelimiter stringenclosure @@ -31,7 +31,7 @@ - The fp parameter must be a valid file pointer to a file + The handle parameter must be a valid file pointer to a file successfully opened by fopen, popen, or fsockopen. @@ -57,8 +57,8 @@ $num fields in line $row:
\n"; $row++; @@ -66,7 +66,7 @@ while ($data = fgetcsv ($fp, 1000, ",")) { print $data[$c] . "
\n"; } } -fclose ($fp); +fclose ($handle); ?> ]]> diff --git a/reference/filesystem/functions/fgets.xml b/reference/filesystem/functions/fgets.xml index 9998da3744..609abdcd17 100644 --- a/reference/filesystem/functions/fgets.xml +++ b/reference/filesystem/functions/fgets.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description stringfgets - resourcefp + resourcehandle intlength @@ -42,12 +42,12 @@ Reading a file line by line diff --git a/reference/filesystem/functions/fgetss.xml b/reference/filesystem/functions/fgetss.xml index 92fb9ee20f..e11cc5c735 100644 --- a/reference/filesystem/functions/fgetss.xml +++ b/reference/filesystem/functions/fgetss.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description stringfgetss - resourcefp + resourcehandle intlength stringallowable_tags diff --git a/reference/filesystem/functions/flock.xml b/reference/filesystem/functions/flock.xml index 27320f2790..e8f5bbc685 100644 --- a/reference/filesystem/functions/flock.xml +++ b/reference/filesystem/functions/flock.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description boolflock - resourcefp + resourcehandle intoperation int&wouldblock @@ -20,7 +20,7 @@ same way of locking or it will not work). - flock operates on fp + flock operates on handle which must be an open file pointer. operation is one of the following values: diff --git a/reference/filesystem/functions/fopen.xml b/reference/filesystem/functions/fopen.xml index 750773c3af..8eabaa7b09 100644 --- a/reference/filesystem/functions/fopen.xml +++ b/reference/filesystem/functions/fopen.xml @@ -1,5 +1,5 @@ - + @@ -121,10 +121,10 @@ ]]> @@ -143,7 +143,7 @@ $fp = fopen ("ftp://user:password@example.com/", "w"); ]]> diff --git a/reference/filesystem/functions/fpassthru.xml b/reference/filesystem/functions/fpassthru.xml index 577a7f45c7..d8b3eb5259 100644 --- a/reference/filesystem/functions/fpassthru.xml +++ b/reference/filesystem/functions/fpassthru.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description intfpassthru - resourcefp + resourcehandle Reads to EOF on the given file pointer from the current position and @@ -19,7 +19,7 @@ If an error occurs, fpassthru returns &false;. Otherwise, fpassthru returns - the number of characters read from fp + the number of characters read from handle and passed through to the output. @@ -29,7 +29,7 @@ rewind to reset the file pointer to the beginning of the file if you have already written data to the file. The file is closed when fpassthru is done reading it (leaving - fp useless). + handle useless). If you just want to dump the contents of a file to the output buffer, diff --git a/reference/filesystem/functions/fputs.xml b/reference/filesystem/functions/fputs.xml index 8c6dcb3ff9..8c15e73d99 100644 --- a/reference/filesystem/functions/fputs.xml +++ b/reference/filesystem/functions/fputs.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description intfputs - resourcefp + resourcehandle stringstr intlength diff --git a/reference/filesystem/functions/fread.xml b/reference/filesystem/functions/fread.xml index 9eb41f3483..3c284e2efe 100644 --- a/reference/filesystem/functions/fread.xml +++ b/reference/filesystem/functions/fread.xml @@ -1,5 +1,5 @@ - + @@ -10,13 +10,13 @@ Description stringfread - resourcefp + resourcehandle intlength fread reads up to length bytes from the file pointer - referenced by fp. Reading stops when + referenced by handle. Reading stops when length bytes have been read or EOF (end of file) reached, whichever comes first. @@ -27,9 +27,9 @@ ]]> @@ -48,9 +48,9 @@ fclose ($fd); ]]> diff --git a/reference/filesystem/functions/fscanf.xml b/reference/filesystem/functions/fscanf.xml index 8e1cf0bcff..a7e1b4594d 100644 --- a/reference/filesystem/functions/fscanf.xml +++ b/reference/filesystem/functions/fscanf.xml @@ -1,5 +1,5 @@ - + @@ -10,14 +10,14 @@ Description mixedfscanf - resourcefp + resourcehandle stringformat stringvar1 The function fscanf is similar to sscanf, but it takes its input from a file - associated with fp and interprets the + associated with handle and interprets the input according to the specified format. If only two parameters were passed to this function, the values parsed will be returned as an array. @@ -35,12 +35,12 @@ <function>fscanf</function> Example diff --git a/reference/filesystem/functions/fseek.xml b/reference/filesystem/functions/fseek.xml index 0cd9d53dc2..f122753d3b 100644 --- a/reference/filesystem/functions/fseek.xml +++ b/reference/filesystem/functions/fseek.xml @@ -1,5 +1,5 @@ - + @@ -10,13 +10,13 @@ Description intfseek - resourcefp + resourcehandle intoffset intwhence Sets the file position indicator for the file referenced by - fp.The new position, measured in bytes + handle.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as diff --git a/reference/filesystem/functions/fstat.xml b/reference/filesystem/functions/fstat.xml index d7fc37d691..764a3e96de 100644 --- a/reference/filesystem/functions/fstat.xml +++ b/reference/filesystem/functions/fstat.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description arrayfstat - resourcefp + resourcehandle Gathers the statistics of the file opened by the file diff --git a/reference/filesystem/functions/ftell.xml b/reference/filesystem/functions/ftell.xml index 70864aabef..58f1cc1e2b 100644 --- a/reference/filesystem/functions/ftell.xml +++ b/reference/filesystem/functions/ftell.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description intftell - resourcefp + resourcehandle Returns the position of the file pointer referenced by fp; i.e., diff --git a/reference/filesystem/functions/ftruncate.xml b/reference/filesystem/functions/ftruncate.xml index a744b919d5..f8ae8c4f8c 100644 --- a/reference/filesystem/functions/ftruncate.xml +++ b/reference/filesystem/functions/ftruncate.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,11 @@ Description boolftruncate - resourcefp + resourcehandle intsize - Takes the filepointer, fp, and truncates the file to + Takes the filepointer, handle, and truncates the file to length, size. This function returns &true; on success and &false; on failure. diff --git a/reference/filesystem/functions/fwrite.xml b/reference/filesystem/functions/fwrite.xml index 6134f8ffea..2bff297e96 100644 --- a/reference/filesystem/functions/fwrite.xml +++ b/reference/filesystem/functions/fwrite.xml @@ -1,5 +1,5 @@ - + @@ -10,14 +10,14 @@ Description intfwrite - resourcefp + resourcehandle stringstring intlength fwrite writes the contents of string to the file stream pointed to by - fp. If the length + handle. If the length argument is given, writing will stop after length bytes have been written or the end of string is reached, whichever comes @@ -56,20 +56,20 @@ if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. - if (!$fp = fopen($filename, 'a')) { + if (!$handle = fopen($filename, 'a')) { print "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. - if (!fwrite($fp, $somecontent)) { + if (!fwrite($handle, $somecontent)) { print "Cannot write to file ($filename)"; exit; } print "Success, wrote ($somecontent) to file ($filename)"; - fclose($fp); + fclose($handle); } else { print "The file $filename is not writable"; diff --git a/reference/filesystem/functions/pclose.xml b/reference/filesystem/functions/pclose.xml index 1f49024423..ddc1072fbd 100644 --- a/reference/filesystem/functions/pclose.xml +++ b/reference/filesystem/functions/pclose.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description intpclose - resourcefp + resourcehandle Closes a file pointer to a pipe opened by diff --git a/reference/filesystem/functions/popen.xml b/reference/filesystem/functions/popen.xml index b4c98f896e..28475bcd17 100644 --- a/reference/filesystem/functions/popen.xml +++ b/reference/filesystem/functions/popen.xml @@ -1,5 +1,5 @@ - + @@ -39,7 +39,7 @@ ]]> @@ -57,11 +57,11 @@ $fp = popen ("/bin/ls", "r"); error_reporting(E_ALL); /* Add redirection so we can get stderr. */ -$fp = popen('/path/to/spooge 2>&1', 'r'); -echo "'$fp'; " . gettype($fp) . "\n"; -$read = fread($fp, 2096); +$handle = popen('/path/to/spooge 2>&1', 'r'); +echo "'$handle'; " . gettype($handle) . "\n"; +$read = fread($handle, 2096); echo $read; -pclose($fp); +pclose($handle); ?> ]]> diff --git a/reference/filesystem/functions/rewind.xml b/reference/filesystem/functions/rewind.xml index c45b9922e2..cf08f3e43e 100644 --- a/reference/filesystem/functions/rewind.xml +++ b/reference/filesystem/functions/rewind.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ Description intrewind - resourcefp + resourcehandle Sets the file position indicator for fp to the beginning of the diff --git a/reference/filesystem/functions/tempnam.xml b/reference/filesystem/functions/tempnam.xml index 5ba8412bc6..43055c9c46 100644 --- a/reference/filesystem/functions/tempnam.xml +++ b/reference/filesystem/functions/tempnam.xml @@ -1,5 +1,5 @@ - + @@ -38,9 +38,9 @@