From 281c6d10b3abf95c3eed4c44d51443ea2a7d43ee Mon Sep 17 00:00:00 2001 From: Simone Cortesi Date: Mon, 25 Mar 2002 23:58:19 +0000 Subject: [PATCH] layout only commit git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@75222 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 107 +++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 61 deletions(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 56470284f1..0d4d627bc1 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -288,7 +288,8 @@ if (!copy($file, $file.'.bak')) { Given a string containing a path to a file, this function will - return the name of the directory. + return the name of the directory. + On Windows, both slash (/) and backslash (\) are used as path separator character. In @@ -347,7 +348,7 @@ $file = dirname ($path); // $file is set to "/etc" @@ -517,9 +518,7 @@ $df = disk_total_space("/"); // $df contains the total number of arrayfgetcsv intfp intlength - string - delimiter - + stringdelimiter Similar to fgets except that @@ -586,7 +585,7 @@ fclose ($fp); Returns a string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on - EOF (whichever comes first). If no length is specified, the length + EOF (whichever comes first). f no length is specified, the length defaults to 1k, or 1024 bytes. @@ -646,9 +645,7 @@ fclose ($fd); stringfgetss intfp intlength - string - allowable_tags - + stringallowable_tags Identical to fgets, except that fgetss @@ -1049,8 +1046,10 @@ $fcontents = implode ('', file ('http://www.php.net/')); Returns the type of the file. Possible values are fifo, char, - dir, block, link, file, and unknown. Returns &false; - if an error occurs. + dir, block, link, file, and unknown. + + + Returns &false; if an error occurs. The results of this function are cached. See @@ -1075,9 +1074,7 @@ $fcontents = implode ('', file ('http://www.php.net/')); boolflock intfp intoperation - int - wouldblock - + intwouldblock PHP supports a portable way of locking complete files in an @@ -1409,9 +1406,7 @@ $fp = fopen ("c:\\data\\info.txt", "r"); intfputs intfp stringstr - int - length - + intlength fputs is an alias to @@ -1509,7 +1504,7 @@ fclose ($fd); <function>fscanf</function> Example -whence, whose values are defined as follows: - SEEK_SET - Set position equal to - offset bytes. SEEK_CUR - - Set position to current location plus - offset. SEEK_END - Set - position to end-of-file plus - offset. (To move to a position before the - end-of-file, you need to pass a negative value in - offset.) + SEEK_SET - Set position equal to offset bytes. + SEEK_CUR - Set position to current location plus offset. + SEEK_END - Set position to end-of-file plus offset. + (To move to a position before the end-of-file, you need to pass a negative + value in offset.) - If whence is not specified, it is assumed to be - SEEK_SET. + If whence is not specified, it is assumed to be + SEEK_SET. Upon success, returns 0; otherwise, returns -1. Note that seeking @@ -1628,8 +1620,9 @@ luigi florist it blocksize for filesystem I/O * number of blocks allocated - * - only valid on systems supporting the st_blksize type--other - systems (i.e. Windows) return -1 + * - only valid on systems supporting the st_blksize type--other + systems (i.e. Windows) return -1 + The results of this function are cached. See clearstatcache for more details. @@ -1662,7 +1655,7 @@ luigi florist it See also fopen, popen, - fseek and rewind. + fseek, and rewind. @@ -1698,9 +1691,7 @@ luigi florist it intfwrite intfp stringstring - int - length - + intlength fwrite writes the contents of @@ -2003,7 +1994,6 @@ if($fp){ boolis_uploaded_file stringfilename - Returns &true; if the file named by filename was uploaded via HTTP POST. This is useful to help ensure that a @@ -2011,14 +2001,12 @@ if($fp){ files upon which it should not be working--for instance, /etc/passwd. - This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. - is_uploaded_file is available only in versions of PHP 3 after PHP 3.0.16, and in versions of PHP 4 @@ -2055,7 +2043,6 @@ if (is_uploaded_file($HTTP_POST_FILES['userfile'])) { ]]> - See also move_uploaded_file, and the section Handling file uploads @@ -2064,6 +2051,7 @@ if (is_uploaded_file($HTTP_POST_FILES['userfile'])) { + link @@ -2151,6 +2139,7 @@ mkdir ("/path/to/my/dir", 0700); + move_uploaded_file @@ -2163,7 +2152,6 @@ mkdir ("/path/to/my/dir", 0700); stringfilename stringdestination - This function checks to ensure that the file designated by filename is a valid upload file (meaning @@ -2171,29 +2159,26 @@ mkdir ("/path/to/my/dir", 0700); the file is valid, it will be moved to the filename given by destination. - If filename is not a valid upload file, then no action will occur, and move_uploaded_file will return &false;. - If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file will return &false;. Additionally, a warning will be issued. - This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. - - + ¬e.sm.uidcheck; + move_uploaded_file is not affected by the normal safe-mode UID-restrictions. This is not unsafe because @@ -2201,13 +2186,11 @@ mkdir ("/path/to/my/dir", 0700); via PHP. - If the destination file already exists, it will be overwritten. - See also is_uploaded_file, and the section Handling file uploads @@ -2216,6 +2199,7 @@ mkdir ("/path/to/my/dir", 0700); + parse_ini_file @@ -2226,9 +2210,7 @@ mkdir ("/path/to/my/dir", 0700); arrayparse_ini_file stringfilename - bool - process_sections - + boolprocess_sections parse_ini_file loads in the @@ -2321,6 +2303,7 @@ Array + pathinfo @@ -2377,6 +2360,7 @@ html + pclose @@ -2406,6 +2390,7 @@ html + popen @@ -2481,9 +2466,7 @@ pclose($fp); intreadfile stringfilename - int - use_include_path - + intuse_include_path Reads a file and writes it to standard output. @@ -2546,7 +2529,7 @@ pclose($fp); See also is_link, - symlink and + symlink, and linkinfo. ¬e.no-windows; @@ -2588,8 +2571,13 @@ pclose($fp); Sets the file position indicator for fp to the beginning of the - file stream. If an error occurs, returns 0. - The file pointer must be valid, and must point to a file + file stream. + + + If an error occurs, returns 0. + + + The file pointer must be valid, and must point to a file successfully opened by fopen. @@ -2844,7 +2832,7 @@ unlink($tmpfname); - See also tmpfile, unlink. + See also tmpfile and unlink. @@ -2901,9 +2889,7 @@ fclose($temp); // this removes the file inttouch stringfilename - int - time - + inttime Attempts to set the access and modification time of the file named by @@ -3003,4 +2989,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -