Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
On Sun, 28 Mar 2004, Ken Tossell wrote: > On Sun, 28 Mar 2004, Rasmus Lerdorf wrote: > > /phpdoc/en/functionsfilesystem.xml > > Log: > > Fix for bug #27730 > > en/functions/extension.xml has been replaced by en/reference/extension/*. > I applied your fix to the new files. :) Thanks.
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
On Sun, 28 Mar 2004, Rasmus Lerdorf wrote: > /phpdoc/en/functions filesystem.xml > Log: > Fix for bug #27730 en/functions/extension.xml has been replaced by en/reference/extension/*. I applied your fix to the new files. :) Ken
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml /en/reference/filesystem/functions fgetcsv.xml
kennyt Sun Mar 28 13:04:16 2004 EDT Modified files: /phpdoc/en/functionsfilesystem.xml /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Reverted two changes to the old functions/ directory and applied Rasmus' fix to en/reference/functions/fgetcsv.xml. http://cvs.php.net/diff.php/phpdoc/en/functions/filesystem.xml?r1=1.146&r2=1.147&ty=u Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.146 phpdoc/en/functions/filesystem.xml:1.147 --- phpdoc/en/functions/filesystem.xml:1.146Sun Mar 28 12:20:05 2004 +++ phpdoc/en/functions/filesystem.xml Sun Mar 28 13:04:14 2004 @@ -8,7 +8,7 @@ instead --> - + Filesystem functions Filesystem @@ -562,7 +562,7 @@
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
rasmus Sun Mar 28 12:20:05 2004 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Fix for bug #27730 http://cvs.php.net/diff.php/phpdoc/en/functions/filesystem.xml?r1=1.145&r2=1.146&ty=u Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.145 phpdoc/en/functions/filesystem.xml:1.146 --- phpdoc/en/functions/filesystem.xml:1.145Tue Jan 6 13:41:32 2004 +++ phpdoc/en/functions/filesystem.xml Sun Mar 28 12:20:05 2004 @@ -8,7 +8,7 @@ instead --> - + Filesystem functions Filesystem @@ -562,7 +562,7 @@
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
On Tuesday 06 January 2004 19:41, Joey Smith wrote: > joey Tue Jan 6 13:41:32 2004 EDT > > Modified files: > /phpdoc/en/functions filesystem.xml You nay want to revert this one, because functions lives their only for historical reason. Changes should go to phpdoc/en/reference/filesystem/functions/is-dir.xml. Take care of the first lines of phpdoc/en/filesystem.xml ;-) BTW: any chance to get functions/* readonly to avoid this sort of commit? Friedhelm
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
joeyTue Jan 6 13:41:32 2004 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Document "false" return for is_file(). Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.144 phpdoc/en/functions/filesystem.xml:1.145 --- phpdoc/en/functions/filesystem.xml:1.144Sun Jun 2 15:03:06 2002 +++ phpdoc/en/functions/filesystem.xml Tue Jan 6 13:41:32 2004 @@ -8,7 +8,7 @@ instead --> - + Filesystem functions Filesystem @@ -1959,7 +1959,7 @@ stringfilename - Returns &true; if the filename exists and is a regular file. + Returns &true; if the filename exists and is a regular file, &false; otherwise. The results of this function are cached. See
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
>>Keep them for a while more...and after all there is a big notice at the >>beginning of each file. > > > And they should always be kept somewhere at least, > as they are a good historical archive (changelog). Right. Just for the long term: we should keep that "somewhere" in mind as an issue, since the number of such unused files and dirs will grow and make the manual rather unmaintainable one day. Sorry for brubbling before thinking, Thomas
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
> >Since this is not the first time... > > > >Would it be too early to delete these files? > Keep them for a while more... and after all > there is a big notice at the beginning of each file. Please keep them. We need them for file updates. Goba
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
> >Since this is not the first time... > > > >Would it be too early to delete these files? > > Keep them for a while more...and after all there is a big notice at the > beginning of each file. And they should always be kept somewhere at least, as they are a good historical archive (changelog). Regards, Philip Olson
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
At 23.48 03/06/02 +0200, Thomas Schöfbeck wrote: >Since this is not the first time... > >Would it be too early to delete these files? Keep them for a while more...and after all there is a big notice at the beginning of each file.
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
Since this is not the first time... Would it be too early to delete these files? Thomas Gabor Hojtsy wrote: >>k.schroeder Sun Jun 2 15:03:06 2002 EDT >> >> Modified files: >>/phpdoc/en/functions filesystem.xml >> Log: >> Bug #13292 file_exists works with UNC names > > > There was no point in touching this file! This is not > used for manual building anymore, so your changes in this > file are pointless... > > Goba > >
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
> k.schroeder Sun Jun 2 15:03:06 2002 EDT > > Modified files: > /phpdoc/en/functions filesystem.xml > Log: > Bug #13292 file_exists works with UNC names There was no point in touching this file! This is not used for manual building anymore, so your changes in this file are pointless... Goba
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
k.schroeder Sun Jun 2 15:03:06 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Bug #13292 file_exists works with UNC names Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.143 phpdoc/en/functions/filesystem.xml:1.144 --- phpdoc/en/functions/filesystem.xml:1.143Wed Apr 17 15:58:42 2002 +++ phpdoc/en/functions/filesystem.xml Sun Jun 2 15:03:06 2002 @@ -1,14 +1,14 @@ - - + - + Filesystem functions Filesystem @@ -19,7 +19,7 @@ and Program Execution sections. - + basename @@ -121,8 +121,8 @@ @@ -356,7 +356,7 @@ disk_free_space example @@ -435,7 +435,7 @@ The file pointer must be valid, and must point to a file successfully opened by fopen or fsockopen. - + @@ -474,8 +474,8 @@ intfp - This function forces a write of all buffered output to the - to the resource pointed to by the file handle + This function forces a write of all buffered output to the + to the resource pointed to by the file handle fp. Returns &true; if successful, &false; otherwise. @@ -507,7 +507,7 @@ successfully opened by fopen, popen, or fsockopen. - + See also fread, fopen, popen, fsockopen, and fgets. @@ -593,7 +593,7 @@ 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). If no length is specified, the length defaults to 1k, or 1024 bytes. @@ -614,7 +614,7 @@ A simple example follows: - + Reading a file line by line @@ -1450,7 +1455,7 @@ -fpassthru +fpassthru Output all remaining data on a file pointer @@ -1537,7 +1542,7 @@ referenced by fp. Reading stops when length bytes have been read or EOF is reached, whichever comes first. - + @@ -1553,7 +1558,7 @@ - On systems which differentiate between binary and text files + On systems which differentiate between binary and text files (i.e. Windows) the file must be opened with 'b' included in fopen mode parameter. @@ -1659,8 +1664,8 @@ 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 + 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.) @@ -1755,7 +1760,7 @@ successfully opened by fopen or popen. - + See also fopen, popen, fseek, and rewind. @@ -1775,8 +1780,8 @@ intsize - Takes the filepointer, fp, and truncates the file to - length, size. This function returns &true; on + Takes the filepointer, fp, and truncates the file to + length, size. This function returns &true; on success and &false; on failure. @@ -1817,7 +1822,7 @@ - On systems which differentiate between binary and text files + On systems which differentiate between binary and text files (i.e. Windows) the file must be opened with 'b' included in fopen mode parameter. @@ -2265,7 +2270,7 @@ If filename is not a valid upload file, then no action will occur, and move_uploaded_file will return - &false;. + &false;. If filename is a valid upload file, but @@ -2474,14 +2479,14 @@ intpclose intfp - + Closes a file pointer to a pipe opened by popen. - - + + The file pointer must be valid, and must have been returned by a successful call to popen. - + Returns the termination status of the process that was run. @@ -2505,11 +2510,11 @@ stringcommand stringmode - + Opens a pipe to a process executed by forking the command given by command. - + Returns a file pointer identical to that returned by fopen, except that it is unidirectional (may only be used for reading or writing) and must be closed with @@ -2518,7 +2523,7 @@ fputs. - If an error occurs, returns &false;. + If an error occurs, returns &false;. @@ -2650,11 +2655,11 @@ stringoldname stringnewname - +
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
wez Wed Apr 10 19:32:35 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Clarify writing to ftp URLs. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.141 phpdoc/en/functions/filesystem.xml:1.142 --- phpdoc/en/functions/filesystem.xml:1.141Wed Apr 10 19:23:38 2002 +++ phpdoc/en/functions/filesystem.xml Wed Apr 10 19:32:34 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -235,7 +235,7 @@ As of PHP 4.3.0, both source and dest may be URLs if the "fopen wrappers" - have been enable. See fopen for more details. + have been enabled. See fopen for more details. @@ -1322,7 +1322,10 @@ and a pointer to the requested file is returned. If the server does not support passive mode ftp, this will fail. You can open files for either reading or writing via ftp (but not both - simultaneously). + simultaneously). If the remote file already exists on the ftp + server and you attempt to open it for writing, this will fail. + If you need to update existing files over ftp, use + ftp_connect. If filename is one of "php://stdin",
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
wez Wed Apr 10 19:23:39 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Document (in part) file_register_wrapper. Clarify some of the other streams related changes/functions. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.140 phpdoc/en/functions/filesystem.xml:1.141 --- phpdoc/en/functions/filesystem.xml:1.140Wed Apr 10 04:25:25 2002 +++ phpdoc/en/functions/filesystem.xml Wed Apr 10 19:23:38 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -669,6 +669,89 @@ + + +file_register_wrapper +Register a URL wrapper implemented as a PHP class + + +Description + + booleanfile_register_wrapper + stringprotocol + stringclassname + + + This function is currently only documented by the example below: + + Implementing a base64 encoding protocol + + + + + + + + file_register_wrapper will return false if the + protocol already has a handler, or if "fopen + wrappers" are disabled. + + + + This function was introduced in PHP 4.3.0. + + + + + file_get_contents @@ -685,6 +768,11 @@ Identical to readfile, except that file_get_contents returns the file in a string. + + + This function was introduced in PHP 4.3.0. + + ¬e.bin-safe; &tip.fopen-wrapper; @@ -1157,15 +1245,15 @@ - + -fgetwrapperdata +file_get_wrapper_data Retrieves header/meta data from "wrapped" file pointers Description - mixedfgetwrapperdata + mixedfile_get_wrapper_data intfp @@ -1176,7 +1264,7 @@ The format of the returned data is deliberately undocumented at this - time. + time, and depends on which wrapper(s) were used to open the file. @@ -1218,7 +1306,7 @@ response header you need to be using PHP 4.0.5 or later; The headers will be stored in the $http_response_header variable. As of PHP 4.3.0 (not yet released), the header information can - be retrieved using the fgetwrapperdata. + be retrieved using the file_get_wrapper_data. HTTP connections are read-only; you cannot write data or copy
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
georg Wed Apr 10 04:25:25 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: changed urls in examples Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.139 phpdoc/en/functions/filesystem.xml:1.140 --- phpdoc/en/functions/filesystem.xml:1.139Mon Apr 8 09:59:33 2002 +++ phpdoc/en/functions/filesystem.xml Wed Apr 10 04:25:25 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -726,13 +726,13 @@ @@ -1316,7 +1316,7 @@
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
betzMon Apr 8 09:59:34 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: more entities: &return.success; Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.138 phpdoc/en/functions/filesystem.xml:1.139 --- phpdoc/en/functions/filesystem.xml:1.138Sun Apr 7 08:48:01 2002 +++ phpdoc/en/functions/filesystem.xml Mon Apr 8 09:59:33 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -77,7 +77,7 @@ change the group of a file to any group of which that user is a member. - Returns &true; on success; otherwise returns &false;. + &return.success; See also chown and @@ -120,7 +120,7 @@ - Returns &true; on success and &false; otherwise. + &return.success; See also chown and @@ -148,7 +148,7 @@ the superuser may change the owner of a file. - Returns &true; on success; otherwise returns &false;. + &return.success; See also chown and @@ -420,8 +420,7 @@ The file pointed to by fp is closed. - Returns &true; on success and &false; - on failure. + &return.success; The file pointer must be valid, and must point to a file @@ -2134,7 +2133,7 @@ - Returns &true; on success and &false; on failure. + &return.success; See also rmdir. @@ -2556,7 +2555,7 @@ newname. - Returns &true; on success and &false; on failure. + &return.success; @@ -2908,7 +2907,7 @@ If the file does not exist, it is created. - Returns &true; on success and &false; otherwise. + &return.success; touch example
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sander Sun Apr 7 08:48:01 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Added two see-also's Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.137 phpdoc/en/functions/filesystem.xml:1.138 --- phpdoc/en/functions/filesystem.xml:1.137Wed Apr 3 06:54:29 2002 +++ phpdoc/en/functions/filesystem.xml Sun Apr 7 08:48:01 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -948,6 +948,9 @@ when the content of the file was changed. Use date on the result of this function to get a printable modification date for use in page footers. + + + See also filectime and touch.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sander Wed Apr 3 06:54:30 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Removed () Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.136 phpdoc/en/functions/filesystem.xml:1.137 --- phpdoc/en/functions/filesystem.xml:1.136Wed Apr 3 06:44:44 2002 +++ phpdoc/en/functions/filesystem.xml Wed Apr 3 06:54:29 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2735,7 +2735,7 @@ '/./' or '/../' components. - realpath() returns &false; on failure, e.g. if + realpath returns &false; on failure, e.g. if the file does not exists.
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
Hey, it's realpath, not with realpath() (it's added automagically). Derick On Wed, 3 Apr 2002, Sander Roobol wrote: > sanderWed Apr 3 06:44:44 2002 EDT > > Modified files: > /phpdoc/en/functions filesystem.xml > Log: > realpath() returns false on failure > > > Index: phpdoc/en/functions/filesystem.xml > diff -u phpdoc/en/functions/filesystem.xml:1.135 >phpdoc/en/functions/filesystem.xml:1.136 > --- phpdoc/en/functions/filesystem.xml:1.135 Thu Mar 28 12:16:38 2002 > +++ phpdoc/en/functions/filesystem.xmlWed Apr 3 06:44:44 2002 > @@ -1,5 +1,5 @@ > > - > + > >Filesystem functions >Filesystem > @@ -2733,6 +2733,10 @@ > the input path and return the canonicalized > absolute pathname. The resulting path will have no symbolic link, > '/./' or '/../' components. > + > + > + realpath() returns &false; on failure, e.g. if > + the file does not exists. > > > > > Derick Rethans - PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net -
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sander Wed Apr 3 06:44:44 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: realpath() returns false on failure Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.135 phpdoc/en/functions/filesystem.xml:1.136 --- phpdoc/en/functions/filesystem.xml:1.135Thu Mar 28 12:16:38 2002 +++ phpdoc/en/functions/filesystem.xml Wed Apr 3 06:44:44 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2733,6 +2733,10 @@ the input path and return the canonicalized absolute pathname. The resulting path will have no symbolic link, '/./' or '/../' components. + + + realpath() returns &false; on failure, e.g. if + the file does not exists.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
cortesi Mon Mar 25 19:00:18 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: adding parameter into DocBook tag Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.133 phpdoc/en/functions/filesystem.xml:1.134 --- phpdoc/en/functions/filesystem.xml:1.133Mon Mar 25 18:58:19 2002 +++ phpdoc/en/functions/filesystem.xml Mon Mar 25 19:00:18 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -585,7 +585,7 @@ 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). f no length is specified, the length + EOF (whichever comes first). If no length is specified, the length defaults to 1k, or 1024 bytes. @@ -2893,7 +2893,7 @@ Attempts to set the access and modification time of the file named by - filename to the value given by time. If the option time is not + filename to the value given by time. If the option time +is not given, uses the present time. This is equivalent to what utime (sometimes referred to as utimes) does.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
cortesi Mon Mar 25 18:58:19 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: layout only commit Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.132 phpdoc/en/functions/filesystem.xml:1.133 --- phpdoc/en/functions/filesystem.xml:1.132Mon Mar 25 08:06:07 2002 +++ phpdoc/en/functions/filesystem.xml Mon Mar 25 18:58:19 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -288,7 +288,8 @@ 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 @@ @@ -517,9 +518,7 @@ arrayfgetcsv intfp intlength - string -delimiter - + stringdelimiter Similar to fgets except that @@ -586,7 +585,7 @@ 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 @@ stringfgetss intfp intlength - string -allowable_tags - + stringallowable_tags Identical to fgets, except that fgetss @@ -1049,8 +1046,10 @@ 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 @@ boolflock intfp intoperation - int -wouldblock - + intwouldblock PHP supports a portable way of locking complete files in an @@ -1409,9 +1406,7 @@ intfputs intfp stringstr - int -length - + intlength fputs is an alias to @@ -1509,7 +1504,7 @@ fscanf Example - - See also move_uploaded_file, and the section Handling file uploads @@ -2064,6 +2051,7 @@ + link @@ -2151,6 +2139,7 @@ + move_uploaded_file @@ -2163,7 +2152,6 @@ stringfilename stringdestination - This function checks to ensure that the file designated by filename is a valid upload file (meaning @@ -2171,29 +2159,26 @@ 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 @@ 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 @@ + parse_ini_file @@ -2226,9 +2210,7 @@ arrayparse_ini_file stringfilename - bool -process_sections - + boolprocess_sections parse_ini_file loads in the @@ -2321,6 +2303,7 @@ + pathinfo @@ -2377,6 +2360,7 @@ + pclose @@ -2406,6 +2390,7 @@ + popen @@ -2481,9 +2466,7 @@ intreadfile stringfilename - int -use_include_path - + intuse_include_path Reads a file and writes it to standard output. @@ -2546,7 +2529,7 @@ See also is_link, - symlink and + symlink, and linkinfo. ¬e.no-windows; @@ -2588,8 +2571,13 @@ 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. + +
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
cortesi Mon Mar 25 08:06:07 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: REFPURPOSE on the same line like on other files and removing some periods Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.131 phpdoc/en/functions/filesystem.xml:1.132 --- phpdoc/en/functions/filesystem.xml:1.131Sun Mar 24 14:09:11 2002 +++ phpdoc/en/functions/filesystem.xml Mon Mar 25 08:06:07 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -14,9 +14,7 @@ basename - - Returns filename component of path - +Returns filename component of path Description @@ -511,9 +509,7 @@ fgetcsv - - Gets line from file pointer and parse for CSV fields - +Gets line from file pointer and parse for CSV fields Description @@ -642,9 +638,7 @@ fgetss - - Gets line from file pointer and strip HTML tags - +Gets line from file pointer and strip HTML tags Description @@ -1358,9 +1352,7 @@ fpassthru - - Output all remaining data on a file pointer - +Output all remaining data on a file pointer Description @@ -1605,9 +1597,7 @@ fstat - - Gets information about a file using an open file pointer - +Gets information about a file using an open file pointer Description @@ -1680,9 +1670,7 @@ ftruncate - - Truncates a file to a given length. - +Truncates a file to a given length Description @@ -1692,8 +1680,9 @@ intsize - Takes the filepointer, fp, and truncates the file to length, size. - This function returns &true; on success and &false; on failure. + Takes the filepointer, fp, and truncates the file to + length, size. This function returns &true; on + success and &false; on failure. @@ -1751,9 +1740,7 @@ set_file_buffer - - Sets file buffering on the given file pointer - +Sets file buffering on the given file pointer Description @@ -1865,9 +1852,7 @@ is_file - - Tells whether the filename is a regular file - +Tells whether the filename is a regular file Description @@ -1892,9 +1877,7 @@ is_link - - Tells whether the filename is a symbolic link - +Tells whether the filename is a symbolic link Description @@ -1925,9 +1908,7 @@ is_readable - - Tells whether the filename is readable - +Tells whether the filename is readable Description @@ -2014,7 +1995,7 @@ is_uploaded_file -Tells whether the file was uploaded via HTTP POST. +Tells whether the file was uploaded via HTTP POST Description @@ -2173,7 +2154,7 @@ move_uploaded_file -Moves an uploaded file to a new location. +Moves an uploaded file to a new location Description @@ -2699,9 +2680,7 @@ lstat - - Gives information about a file or symbolic link - +Gives information about a file or symbolic link Description
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sander Sun Mar 24 14:09:12 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Various small fixes to the rmdir() documentation. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.130 phpdoc/en/functions/filesystem.xml:1.131 --- phpdoc/en/functions/filesystem.xml:1.130Sat Mar 16 12:02:35 2002 +++ phpdoc/en/functions/filesystem.xml Sun Mar 24 14:09:11 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2633,19 +2633,16 @@ Description - intrmdir + boolrmdir stringdirname - Attempts to remove the directory named by pathname. The directory - must be empty, and the relevant permissions must permit. - this. + Attempts to remove the directory named by dirname. + The directory must be empty, and the relevant permissions must permit this. + &return.success; - - If an error occurs, returns 0. - - See also mkdir. + See also mkdir and unlink.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
wez Sat Mar 16 12:02:36 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: More docs for streams related changes. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.129 phpdoc/en/functions/filesystem.xml:1.130 --- phpdoc/en/functions/filesystem.xml:1.129Sat Mar 16 10:06:08 2002 +++ phpdoc/en/functions/filesystem.xml Sat Mar 16 12:02:35 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -233,6 +233,13 @@ + + + As of PHP 4.3.0, both source and + dest may be URLs if the "fopen wrappers" + have been enable. See fopen for more details. + + If the destination file already exists, it will be overwritten. @@ -672,6 +679,27 @@ + + +file_get_contents +Reads entire file into a string + + +Description + + stringfile_get_contents + stringfilename + intuse_include_path + + + Identical to readfile, except that + file_get_contents returns the file in a string. + +¬e.bin-safe; +&tip.fopen-wrapper; + + + file @@ -720,6 +748,12 @@ + + + As of PHP 4.3.0 you can use file_get_contents to + return the contents of a file as a string in a binary safe manner. + + ¬e.not-bin-safe; &tip.fopen-wrapper; @@ -1184,6 +1218,7 @@ As of PHP 4.3.0 (not yet released), if you have compiled in support for OpenSSL, you may use "https://"; to open an HTTP connection over SSL. + Note that the file pointer allows you to retrieve only the body of the response; to retrieve the HTTP
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml network.xml
wez Sat Mar 16 10:06:09 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml network.xml Log: update docs to reflect recent streams changes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.128 phpdoc/en/functions/filesystem.xml:1.129 --- phpdoc/en/functions/filesystem.xml:1.128Sat Mar 9 13:01:17 2002 +++ phpdoc/en/functions/filesystem.xml Sat Mar 16 10:06:08 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1130,6 +1130,35 @@ + + +fgetwrapperdata +Retrieves header/meta data from "wrapped" file pointers + + +Description + + mixedfgetwrapperdata + intfp + + + This function returns header or meta data from files opened with + fopen. This is useful to return the response + headers for HTTP connections, or some other statistics for other + resources. + + + The format of the returned data is deliberately undocumented at this + time. + + + + This function was introduced in PHP 4.3.0. + + + + + fopen @@ -1152,10 +1181,20 @@ request in order to handle name-based virtual hosts. + As of PHP 4.3.0 (not yet released), if you have compiled in + support for OpenSSL, you may use "https://"; to open an HTTP + connection over SSL. + Note that the file pointer allows you to retrieve only the - body of the response; you cannot - access the HTTP response header using this function. Additionally, - HTTP connections are read-only. + body of the response; to retrieve the HTTP + response header you need to be using PHP 4.0.5 or later; + The headers will be stored in the $http_response_header variable. + As of PHP 4.3.0 (not yet released), the header information can + be retrieved using the fgetwrapperdata. + + + HTTP connections are read-only; you cannot write data or copy + files to an HTTP resource. Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because Index: phpdoc/en/functions/network.xml diff -u phpdoc/en/functions/network.xml:1.59 phpdoc/en/functions/network.xml:1.60 --- phpdoc/en/functions/network.xml:1.59Wed Mar 13 14:18:30 2002 +++ phpdoc/en/functions/network.xml Sat Mar 16 10:06:08 2002 @@ -1,5 +1,5 @@ - + Network Functions Network @@ -159,6 +159,13 @@ socket, port must be set to 0 in this case. The optional timeout can be used to set a timeout in seconds for the connect system call. + + + As of PHP 4.3.0, if you have compiled in OpenSSL support, you may + prefix the hostname with either + 'ssl://' or 'tls://' to + use an SSL or TLS client connection over TCP/IP to connect + to the remote host. fsockopen returns a file pointer which may
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
alindeman Sat Mar 9 13:01:18 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: make it more clean that the example will not work after version 4.0.2 Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.127 phpdoc/en/functions/filesystem.xml:1.128 --- phpdoc/en/functions/filesystem.xml:1.127Sun Mar 3 17:48:53 2002 +++ phpdoc/en/functions/filesystem.xml Sat Mar 9 13:01:17 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1971,9 +1971,9 @@ use the following function to help protect yourself: - This will not work in versions of PHP 4 - after 4.0.2. It depends on internal functionality of PHP which - changed after that version. + The following example will not work in + versions of PHP 4 after 4.0.2. It depends on internal + functionality of PHP which changed after that version.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Sun Mar 3 17:48:54 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: filesystem: Added , see also dir and exec functions. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.126 phpdoc/en/functions/filesystem.xml:1.127 --- phpdoc/en/functions/filesystem.xml:1.126Sun Mar 3 05:20:04 2002 +++ phpdoc/en/functions/filesystem.xml Sun Mar 3 17:48:53 2002 @@ -1,9 +1,16 @@ - + Filesystem functions Filesystem + + +For related functions, see also the Directory +and Program Execution sections. + + + basename
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
tom Sun Mar 3 05:20:05 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: removed doubled note about intro of opt.param Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.125 phpdoc/en/functions/filesystem.xml:1.126 --- phpdoc/en/functions/filesystem.xml:1.125Sat Mar 2 14:25:50 2002 +++ phpdoc/en/functions/filesystem.xml Sun Mar 3 05:20:04 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -595,12 +595,6 @@ popen, or fsockopen. - - - The length parameter is only optional in - PHP 4.2.0 and newer versions. - - A simple example follows:
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Sat Mar 2 14:25:51 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: file: using implode() in example, as opposed to the alias join() Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.124 phpdoc/en/functions/filesystem.xml:1.125 --- phpdoc/en/functions/filesystem.xml:1.124Wed Feb 27 12:26:20 2002 +++ phpdoc/en/functions/filesystem.xml Sat Mar 2 14:25:50 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -713,7 +713,7 @@ } // get a web page into a string -$fcontents = join ('', file ('http://www.php.net/')); +$fcontents = implode ('', file ('http://www.php.net/')); ?> ]]>
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sander Wed Feb 27 12:26:20 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: move_uploaded_file() works fine with safe-mode on (#13686) Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.123 phpdoc/en/functions/filesystem.xml:1.124 --- phpdoc/en/functions/filesystem.xml:1.123Sat Feb 9 22:45:11 2002 +++ phpdoc/en/functions/filesystem.xml Wed Feb 27 12:26:20 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2137,8 +2137,15 @@ system. -¬e.sm.uidcheck; - + + + move_uploaded_file is not affected by the normal + safe-mode UID-restrictions. This is not unsafe because + move_uploaded_file only operates on files uploaded + via PHP. + + + If the destination file already exists, it will be overwritten.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 22:45:11 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Version fix. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.122 phpdoc/en/functions/filesystem.xml:1.123 --- phpdoc/en/functions/filesystem.xml:1.122Sat Feb 9 21:38:43 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 22:45:11 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -598,7 +598,7 @@ The length parameter is only optional in - PHP 4.2.0-dev and newer versions. + PHP 4.2.0 and newer versions.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 21:38:43 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Hmm...fgets()'s second parameter is only optional in cvs, so far. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.121 phpdoc/en/functions/filesystem.xml:1.122 --- phpdoc/en/functions/filesystem.xml:1.121Sat Feb 9 19:59:02 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 21:38:43 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -598,7 +598,7 @@ The length parameter is only optional in - PHP 4.1.0 and newer versions. + PHP 4.2.0-dev and newer versions.
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
On Sat, 2002-02-09 at 17:31, Andrew L. wrote: > Is this a CVS thing? I'm not running a devel release. Are you sure that > this was implemented in 4.1.0?? Hmm, you're right. The change was made on December 5, and 4.1.0 was released on December 10--but the change must have been made in a branch which didn't get into the release. I've updated the docs accordingly--thanks for pointing that out. Torben > On Saturday 09 February 2002 07:27 pm, Lars Torben Wilson wrote: > > On Sat, 2002-02-09 at 17:00, Andrew L. wrote: > > > I'm running PHP/4.1.1 and I get warning messages if I don't include the > > > second param. Am I missing something? > > > > I don't know, but I don't get the error: > > > > > error_reporting(E_ALL); > > > > $fp = fopen('/etc/passwd', 'r'); > > > > while (!feof($fp)) { > > echo fgets($fp); > > } > > > > fclose($fp); > > ?> > > > > ...and in CVS we find: > > > > http://cvs.php.net/diff.php/php4/ext/standard/file.c?r1=1.195&r2=1.196&ty=h > > > > And it's still there in 4.2.0-dev: > > > > http://cvs.php.net/co.php/php4/ext/standard/file.c?r=1.204 > > > > I don't know why you're getting errors. > > > > > > Torben > > > > > On Saturday 09 February 2002 06:38 pm, Torben Wilson wrote: > > > > torben Sat Feb 9 19:38:40 2002 EDT > > > > > > > > Modified files: > > > > /phpdoc/en/functionsfilesystem.xml > > > > Log: > > > > Reverting this; the second parameter is indeed optional in versions > > > > newer than 4.1.0 (also added a note to this effect). > > > > > > > > > > > > Index: phpdoc/en/functions/filesystem.xml > > > > diff -u phpdoc/en/functions/filesystem.xml:1.119 > > > > phpdoc/en/functions/filesystem.xml:1.120 --- > > > > phpdoc/en/functions/filesystem.xml:1.119Sat Feb 9 19:18:53 2002 +++ > > > > phpdoc/en/functions/filesystem.xml Sat Feb 9 19:38:40 2002 > > > > @@ -1,5 +1,5 @@ > > > > > > > > - > > > > + > > > > > > > >Filesystem functions > > > >Filesystem > > > > @@ -556,7 +556,7 @@ > > > > > > > >stringfgets > > > > > > > > intfp - > > > > intlength > > >> + > > > choice="opt">intlength > > >> > > > > > > > > Returns a string of up to length - 1 bytes read from the file > > > > @@ -572,8 +572,8 @@ > > > > Common Pitfalls: > > > > > > > > > > > > - People used to the 'C' semantics of fgets should note the > > > > - difference in how EOF is returned. > > > > + People used to the 'C' semantics of fgets > > > > + should note the difference in how EOF is > > > > returned. > > > > > > > > The file pointer must be valid, and must point to a file > > > > @@ -581,6 +581,12 @@ > > > > popen, or > > > > fsockopen. > > > > > > > > + > > > > + > > > > + The length parameter is only optional in > > > > + PHP 4.1.0 and newer versions. > > > > + > > > > + > > > > > > > > A simple example follows: > > > > > > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
Is this a CVS thing? I'm not running a devel release. Are you sure that this was implemented in 4.1.0?? On Saturday 09 February 2002 07:27 pm, Lars Torben Wilson wrote: > On Sat, 2002-02-09 at 17:00, Andrew L. wrote: > > I'm running PHP/4.1.1 and I get warning messages if I don't include the > > second param. Am I missing something? > > I don't know, but I don't get the error: > > error_reporting(E_ALL); > > $fp = fopen('/etc/passwd', 'r'); > > while (!feof($fp)) { > echo fgets($fp); > } > > fclose($fp); > ?> > > ...and in CVS we find: > > http://cvs.php.net/diff.php/php4/ext/standard/file.c?r1=1.195&r2=1.196&ty=h > > And it's still there in 4.2.0-dev: > > http://cvs.php.net/co.php/php4/ext/standard/file.c?r=1.204 > > I don't know why you're getting errors. > > > Torben > > > On Saturday 09 February 2002 06:38 pm, Torben Wilson wrote: > > > torbenSat Feb 9 19:38:40 2002 EDT > > > > > > Modified files: > > > /phpdoc/en/functions filesystem.xml > > > Log: > > > Reverting this; the second parameter is indeed optional in versions > > > newer than 4.1.0 (also added a note to this effect). > > > > > > > > > Index: phpdoc/en/functions/filesystem.xml > > > diff -u phpdoc/en/functions/filesystem.xml:1.119 > > > phpdoc/en/functions/filesystem.xml:1.120 --- > > > phpdoc/en/functions/filesystem.xml:1.119 Sat Feb 9 19:18:53 2002 +++ > > > phpdoc/en/functions/filesystem.xmlSat Feb 9 19:38:40 2002 > > > @@ -1,5 +1,5 @@ > > > > > > - > > > + > > > > > >Filesystem functions > > >Filesystem > > > @@ -556,7 +556,7 @@ > > > > > >stringfgets > > > > > > intfp - > > > intlength > >> + > > choice="opt">intlength > >> > > > > > > Returns a string of up to length - 1 bytes read from the file > > > @@ -572,8 +572,8 @@ > > > Common Pitfalls: > > > > > > > > > - People used to the 'C' semantics of fgets should note the > > > - difference in how EOF is returned. > > > + People used to the 'C' semantics of fgets > > > + should note the difference in how EOF is > > > returned. > > > > > > The file pointer must be valid, and must point to a file > > > @@ -581,6 +581,12 @@ > > > popen, or > > > fsockopen. > > > > > > + > > > + > > > + The length parameter is only optional in > > > + PHP 4.1.0 and newer versions. > > > + > > > + > > > > > > A simple example follows: > > >
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
On Sat, 2002-02-09 at 17:00, Andrew L. wrote: > I'm running PHP/4.1.1 and I get warning messages if I don't include the > second param. Am I missing something? I don't know, but I don't get the error: ...and in CVS we find: http://cvs.php.net/diff.php/php4/ext/standard/file.c?r1=1.195&r2=1.196&ty=h And it's still there in 4.2.0-dev: http://cvs.php.net/co.php/php4/ext/standard/file.c?r=1.204 I don't know why you're getting errors. Torben > On Saturday 09 February 2002 06:38 pm, Torben Wilson wrote: > > torben Sat Feb 9 19:38:40 2002 EDT > > > > Modified files: > > /phpdoc/en/functionsfilesystem.xml > > Log: > > Reverting this; the second parameter is indeed optional in versions > > newer than 4.1.0 (also added a note to this effect). > > > > > > Index: phpdoc/en/functions/filesystem.xml > > diff -u phpdoc/en/functions/filesystem.xml:1.119 > > phpdoc/en/functions/filesystem.xml:1.120 --- > > phpdoc/en/functions/filesystem.xml:1.119Sat Feb 9 19:18:53 2002 +++ > > phpdoc/en/functions/filesystem.xml Sat Feb 9 19:38:40 2002 > > @@ -1,5 +1,5 @@ > > > > - > > + > > > >Filesystem functions > >Filesystem > > @@ -556,7 +556,7 @@ > > > >stringfgets > >intfp > > - > > intlength + > > > choice="opt">intlength > > > > > > Returns a string of up to length - 1 bytes read from the file > > @@ -572,8 +572,8 @@ > > Common Pitfalls: > > > > > > - People used to the 'C' semantics of fgets should note the > > - difference in how EOF is returned. > > + People used to the 'C' semantics of fgets > > + should note the difference in how EOF is returned. > > > > > > The file pointer must be valid, and must point to a file > > @@ -581,6 +581,12 @@ > > popen, or > > fsockopen. > > > > + > > + > > + The length parameter is only optional in > > + PHP 4.1.0 and newer versions. > > + > > + > > > > A simple example follows: > > > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
I'm running PHP/4.1.1 and I get warning messages if I don't include the second param. Am I missing something? On Saturday 09 February 2002 06:38 pm, Torben Wilson wrote: > torbenSat Feb 9 19:38:40 2002 EDT > > Modified files: > /phpdoc/en/functions filesystem.xml > Log: > Reverting this; the second parameter is indeed optional in versions > newer than 4.1.0 (also added a note to this effect). > > > Index: phpdoc/en/functions/filesystem.xml > diff -u phpdoc/en/functions/filesystem.xml:1.119 > phpdoc/en/functions/filesystem.xml:1.120 --- > phpdoc/en/functions/filesystem.xml:1.119 Sat Feb 9 19:18:53 2002 +++ > phpdoc/en/functions/filesystem.xmlSat Feb 9 19:38:40 2002 > @@ -1,5 +1,5 @@ > > - > + > >Filesystem functions >Filesystem > @@ -556,7 +556,7 @@ > >stringfgets >intfp > - > intlength + > choice="opt">intlength > > > Returns a string of up to length - 1 bytes read from the file > @@ -572,8 +572,8 @@ > Common Pitfalls: > > > - People used to the 'C' semantics of fgets should note the > - difference in how EOF is returned. > + People used to the 'C' semantics of fgets > + should note the difference in how EOF is returned. > > > The file pointer must be valid, and must point to a file > @@ -581,6 +581,12 @@ > popen, or > fsockopen. > > + > + > + The length parameter is only optional in > + PHP 4.1.0 and newer versions. > + > + > > A simple example follows: >
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 19:59:02 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Closes bug #14538: noted change in dirname() behaviour. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.120 phpdoc/en/functions/filesystem.xml:1.121 --- phpdoc/en/functions/filesystem.xml:1.120Sat Feb 9 19:38:40 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 19:59:02 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -293,6 +293,20 @@ + + + In PHP 4.0.3, dirname was fixed to be + POSIX-compliant. Essentially, this means that if there are no + slashes in path , a dot + ('.') is returned, indicating the current + directory. Otherwise, the returned string is + path with any trailing + /component removed. Note that this means that + you will often get a slash or a dot back from + dirname in situations where the older + functionality would have given you the empty string. + + See also: basename
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 19:38:40 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Reverting this; the second parameter is indeed optional in versions newer than 4.1.0 (also added a note to this effect). Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.119 phpdoc/en/functions/filesystem.xml:1.120 --- phpdoc/en/functions/filesystem.xml:1.119Sat Feb 9 19:18:53 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 19:38:40 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -556,7 +556,7 @@ stringfgets intfp - intlength + intlength Returns a string of up to length - 1 bytes read from the file @@ -572,8 +572,8 @@ Common Pitfalls: - People used to the 'C' semantics of fgets should note the - difference in how EOF is returned. + People used to the 'C' semantics of fgets + should note the difference in how EOF is returned. The file pointer must be valid, and must point to a file @@ -581,6 +581,12 @@ popen, or fsockopen. + + + The length parameter is only optional in + PHP 4.1.0 and newer versions. + + A simple example follows:
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
alindeman Sat Feb 9 19:18:53 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: fgets() second param is not optional Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.118 phpdoc/en/functions/filesystem.xml:1.119 --- phpdoc/en/functions/filesystem.xml:1.118Sat Feb 9 18:44:43 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 19:18:53 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -556,7 +556,7 @@ stringfgets intfp - intlength + intlength Returns a string of up to length - 1 bytes read from the file
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 18:44:43 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Closes bug #14621. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.117 phpdoc/en/functions/filesystem.xml:1.118 --- phpdoc/en/functions/filesystem.xml:1.117Sat Feb 9 16:48:38 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 18:44:43 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2348,7 +2348,7 @@ fputs. - If an error occurs, returns &false;. + If an error occurs, returns &false;. @@ -2359,6 +2359,29 @@ + + + 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: + + + + + + + See also pclose.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Sat Feb 9 16:48:38 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Fixed some grammar. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.116 phpdoc/en/functions/filesystem.xml:1.117 --- phpdoc/en/functions/filesystem.xml:1.116Wed Feb 6 20:45:38 2002 +++ phpdoc/en/functions/filesystem.xml Sat Feb 9 16:48:38 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2564,7 +2564,8 @@ Returns &false; in case of error. - stat doesn't handle URL as does fopen. + stat cannot be used on remote files. The results of this function are cached. See @@ -2613,7 +2614,12 @@ number of blocks allocated * - only valid on systems supporting the st_blksize type--other - systems (i.e. Windows) return -1 + systems (i.e. Windows) return -1. + + + lstat cannot be used on remote files. + The results of this function are cached. See clearstatcache for more details.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Wed Feb 6 20:45:39 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Replaced the userland version of is_uploaded_file() for older versions of PHP, except this time in the is_uploaded_file refentry. There are still people who have no choice but to run older versions. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.115 phpdoc/en/functions/filesystem.xml:1.116 --- phpdoc/en/functions/filesystem.xml:1.115Sat Feb 2 10:35:58 2002 +++ phpdoc/en/functions/filesystem.xml Wed Feb 6 20:45:38 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1923,15 +1923,10 @@ Description - - boolis_uploaded_file - stringfilename - - - - This function is available only in versions of PHP 3 after PHP - 3.0.16, and in versions of PHP 4 after 4.0.2. - + + boolis_uploaded_file + stringfilename + Returns &true; if the file named by filename was @@ -1946,6 +1941,43 @@ 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 + after 4.0.2. If you are stuck using an earlier version, you can + use the following function to help protect yourself: + + + This will not work in versions of PHP 4 + after 4.0.2. It depends on internal functionality of PHP which + changed after that version. + + + + +
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml gmp.xml imap.xml
hirokawaSun Jan 20 09:39:11 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml gmp.xml imap.xml Log: fixed typos. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.113 phpdoc/en/functions/filesystem.xml:1.114 --- phpdoc/en/functions/filesystem.xml:1.113Sat Jan 12 11:28:50 2002 +++ phpdoc/en/functions/filesystem.xml Sun Jan 20 09:39:11 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1190,9 +1190,7 @@ string filename string mode int - -use_include_path - + use_include_path Index: phpdoc/en/functions/gmp.xml diff -u phpdoc/en/functions/gmp.xml:1.21 phpdoc/en/functions/gmp.xml:1.22 --- phpdoc/en/functions/gmp.xml:1.21Thu Jan 17 22:32:23 2002 +++ phpdoc/en/functions/gmp.xml Sun Jan 20 09:39:11 2002 @@ -1,5 +1,5 @@ - + GMP functions GMP @@ -169,7 +169,7 @@ Converting a GMP number to a string
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
zak Sun Jan 6 19:34:11 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: HTTP connections opened by fopen are read-only Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.111 phpdoc/en/functions/filesystem.xml:1.112 --- phpdoc/en/functions/filesystem.xml:1.111Fri Jan 4 08:36:20 2002 +++ phpdoc/en/functions/filesystem.xml Sun Jan 6 19:34:10 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1207,7 +1207,8 @@ Note that the file pointer allows you to retrieve only the body of the response; you cannot - access the HTTP response header using this function. + access the HTTP response header using this function. Additionally, + HTTP connections are read-only. Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sas Fri Jan 4 08:36:22 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Refine description of touch Add a note that should prevent others from reimplementing utime, because they did not find touch in the manual :-) Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.110 phpdoc/en/functions/filesystem.xml:1.111 --- phpdoc/en/functions/filesystem.xml:1.110Thu Jan 3 13:52:10 2002 +++ phpdoc/en/functions/filesystem.xml Fri Jan 4 08:36:20 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2914,7 +2914,7 @@ touch -Sets modification time of file +Sets access and modification time of file Description @@ -2930,9 +2930,10 @@ - Attempts to set the modification time of the file named by + Attempts to set the access and modification time of the file named by filename to the value given by time. If the option time is not - given, uses the present time. + given, uses the present time. This is equivalent to what utime + (sometimes referred to as utimes) does. If the file does not exist, it is created.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Thu Jan 3 13:52:11 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: PHP 4.0.0 betas/RC's == PHP 4.0.0 Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.109 phpdoc/en/functions/filesystem.xml:1.110 --- phpdoc/en/functions/filesystem.xml:1.109Wed Jan 2 22:04:26 2002 +++ phpdoc/en/functions/filesystem.xml Thu Jan 3 13:52:10 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -679,7 +679,7 @@ allowable_tags was added in PHP 3.0.13, - PHP4B3. + PHP 4.0.0. @@ -1586,7 +1586,7 @@ - The whence argument was added after PHP 4.0 RC1. + The whence argument was added after PHP 4.0.0.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
irc-htmlWed Jan 2 22:04:27 2002 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: function.fwrite: return information Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.108 phpdoc/en/functions/filesystem.xml:1.109 --- phpdoc/en/functions/filesystem.xml:1.108Sun Dec 23 19:56:12 2001 +++ phpdoc/en/functions/filesystem.xml Wed Jan 2 22:04:26 2002 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1725,6 +1725,10 @@ length bytes have been written or the end of string is reached, whichever comes first. + + + fwrite returns the number of bytes + written, or -1 on error. Note that if the length argument is given,
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Sun Dec 23 19:56:12 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: fgets: Modifying recently added note to make more sense, length is a parameter. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.107 phpdoc/en/functions/filesystem.xml:1.108 --- phpdoc/en/functions/filesystem.xml:1.107Sun Dec 23 03:05:13 2001 +++ phpdoc/en/functions/filesystem.xml Sun Dec 23 19:56:12 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -634,9 +634,9 @@ - - The length become optional in PHP 4.2.0 - + + The length parameter became optional in PHP 4.2.0 + See also fread, fopen,
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Sun Dec 23 03:05:14 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: fgets: note that length parameter become optional in 4.2.0 Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.106 phpdoc/en/functions/filesystem.xml:1.107 --- phpdoc/en/functions/filesystem.xml:1.106Thu Dec 20 19:57:43 2001 +++ phpdoc/en/functions/filesystem.xml Sun Dec 23 03:05:13 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -633,6 +633,11 @@ + + + The length become optional in PHP 4.2.0 + + See also fread, fopen, popen, fgetc,
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwThu Dec 20 19:57:43 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: unlink: &return.success; Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.105 phpdoc/en/functions/filesystem.xml:1.106 --- phpdoc/en/functions/filesystem.xml:1.105Thu Dec 20 14:11:40 2001 +++ phpdoc/en/functions/filesystem.xml Thu Dec 20 19:57:43 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2991,7 +2991,7 @@ unlink() function. - Returns 0 or &false; on an error. + &return.success; See also rmdir for removing directories.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwThu Dec 20 14:11:40 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: readlink: see also is_link (and not readlink, which seems a little redundant :) Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.104 phpdoc/en/functions/filesystem.xml:1.105 --- phpdoc/en/functions/filesystem.xml:1.104Thu Dec 20 14:09:15 2001 +++ phpdoc/en/functions/filesystem.xml Thu Dec 20 14:11:40 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2539,8 +2539,8 @@ in case of error. - See also symlink, - readlink and + See also is_link, + symlink and linkinfo. ¬e.no-windows;
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwThu Dec 20 14:09:15 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: is_link: see also readlink Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.103 phpdoc/en/functions/filesystem.xml:1.104 --- phpdoc/en/functions/filesystem.xml:1.103Tue Dec 18 17:49:42 2001 +++ phpdoc/en/functions/filesystem.xml Thu Dec 20 14:09:15 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1915,8 +1915,8 @@ clearstatcache for more details. - See also is_dir and - is_file. + See also is_dir, + is_file, and readlink. This function will not work on
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwTue Dec 18 17:49:45 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: rewind: note that append mode always writes to the end of the file Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.102 phpdoc/en/functions/filesystem.xml:1.103 --- phpdoc/en/functions/filesystem.xml:1.102Tue Dec 18 15:56:38 2001 +++ phpdoc/en/functions/filesystem.xml Tue Dec 18 17:49:42 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2590,6 +2590,12 @@ The file pointer must be valid, and must point to a file successfully opened by fopen. + + + If you have opened the file in append ("a") mode, any data you write + to the file will always be appended, regardless of the file position. + + See also fseek and ftell.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwTue Dec 18 15:56:39 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: fseek: add note about seeking relative to SEEK_END Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.101 phpdoc/en/functions/filesystem.xml:1.102 --- phpdoc/en/functions/filesystem.xml:1.101Fri Dec 14 16:13:17 2001 +++ phpdoc/en/functions/filesystem.xml Tue Dec 18 15:56:38 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1562,7 +1562,9 @@ Set position to current location plus offset. SEEK_END - Set position to end-of-file plus - offset. + 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
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwFri Dec 14 16:13:18 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: chown,chgrp: allows name or number; unlink: should work just fine on windows; all: use ¬e.no-windows; Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.100 phpdoc/en/functions/filesystem.xml:1.101 --- phpdoc/en/functions/filesystem.xml:1.100Fri Dec 14 15:18:25 2001 +++ phpdoc/en/functions/filesystem.xml Fri Dec 14 16:13:17 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -70,11 +70,10 @@ - Attempts to change the group of the file - filename to - group. Only the superuser may change the - group of a file arbitrarily; other users may change the group of - a file to any group of which that user is a member. + Attempts to change the group of the file filename + to group (specified by name or number). Only the + superuser may change the group of a file arbitrarily; other users may + change the group of a file to any group of which that user is a member. Returns &true; on success; otherwise returns &false;. @@ -83,11 +82,7 @@ See also chown and chmod. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -132,11 +127,7 @@ See also chown and chgrp. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -155,8 +146,9 @@ - Attempts to change the owner of the file filename to user - user. Only the superuser may change the owner of a file. + Attempts to change the owner of the file filename + to user user (specified by name or number). Only + the superuser may change the owner of a file. Returns &true; on success; otherwise returns &false;. @@ -165,11 +157,7 @@ See also chown and chmod. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -894,15 +882,13 @@ The results of this function are cached. See clearstatcache for more details. +¬e.no-windows; - This function does not work on Windows systems + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. - - This function will not work on remote files; the file to - be examined must be accessible via the server's filesystem. - @@ -932,11 +918,7 @@ linkend="features.remote-files">remote files; the file to be examined must be accessible via the server's filesystem. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -1002,11 +984,7 @@ linkend="features.remote-files">remote files; the file to be examined must be accessible via the server's filesystem. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -1943,11 +1921,7 @@ linkend="features.remote-files">remote files; the file to be examined must be accessible via the server's filesystem. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -2109,11 +2083,7 @@ and readlink along with linkinfo. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -2142,11 +2112,7 @@ See also symlink, link, and readlink. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -2575,11 +2541,7 @@ readlink and linkinfo. - - - This function does not work on Windows systems - - +¬e.no-windows; @@ -2818,11 +2780,7 @@ and readlink along with linkinfo. - - - This function does not work on Windows systems. - - +¬e.no-windows; @@ -3003,11 +2961,7 @@ umask without arguments simply returns the current umask. - - - This function may not work on Windows systems. - - +¬e.no-windows; @@ -3034,11 +2988,6 @@ See also rmdir for removing directories. - - - This function may not work on Windows systems. - -
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwFri Dec 14 15:18:25 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: filesize: clarify that size is in bytes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.99 phpdoc/en/functions/filesystem.xml:1.100 --- phpdoc/en/functions/filesystem.xml:1.99 Fri Dec 14 14:38:23 2001 +++ phpdoc/en/functions/filesystem.xml Fri Dec 14 15:18:25 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1052,7 +1052,7 @@ - Returns the size of the file, or &false; in case of an error. + Returns the size of the file in bytes, or &false; in case of an error. The results of this function are cached. See
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwFri Dec 14 14:38:23 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: fpassthru: incorporate notes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.98 phpdoc/en/functions/filesystem.xml:1.99 --- phpdoc/en/functions/filesystem.xml:1.98 Wed Dec 12 15:46:47 2001 +++ phpdoc/en/functions/filesystem.xml Fri Dec 14 14:38:23 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1366,25 +1366,35 @@ - Reads to EOF on the given file pointer and writes the results to - standard output. + Reads to EOF on the given file pointer from the current position and + writes the results to standard output. If an error occurs, fpassthru returns &false;. - The file pointer must be valid, and must point to a file - successfully opened by fopen, - popen, or fsockopen. - The file is closed when fpassthru is done - reading it (leaving fp useless). + The file pointer must be valid, and must point to a file successfully + opened by fopen, popen, or + fsockopen. You may need to call + 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). If you just want to dump the contents of a file to stdout you may want to use the readfile, which saves you the fopen call. + + + When using fpassthru on a binary file on Windows + systems, you should make sure to open the file in binary mode by + appending a b to the mode used in the call to + fopen. + + See also readfile, fopen, popen, and
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwSat Dec 8 17:14:24 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: file: incorporate user notes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.96 phpdoc/en/functions/filesystem.xml:1.97 --- phpdoc/en/functions/filesystem.xml:1.96 Sat Dec 8 14:22:07 2001 +++ phpdoc/en/functions/filesystem.xml Sat Dec 8 17:14:24 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -720,6 +720,13 @@ element of the array corresponds to a line in the file, with the newline still attached. + + + Each line in the resulting array will include the line ending, so you + still need to use trim if you do not want the line + ending present. + + You can use the optional second parameter and set it to "1", if you want to search for the file in the http://www.php.net'); +$fcontents = file ('http://www.php.net/'); while (list ($line_num, $line) = each ($fcontents)) { -echo "Line $line_num:; " . htmlspecialchars ($line) . "\n"; +echo "Line $line_num:; ", htmlspecialchars ($line), "\n"; } // get a web page into a string -$fcontents = join ('', file ('http://www.php.net')); +$fcontents = join ('', file ('http://www.php.net/')); ?> ]]> +¬e.not-bin-safe; +&tip.fopen-wrapper; See also readfile, fopen, fsockopen, and
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwSat Dec 8 14:22:07 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: move_uploaded_file: add warning about destination being overwritten, remove redundant version note Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.95 phpdoc/en/functions/filesystem.xml:1.96 --- phpdoc/en/functions/filesystem.xml:1.95 Sat Dec 8 14:17:03 2001 +++ phpdoc/en/functions/filesystem.xml Sat Dec 8 14:22:07 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2186,11 +2186,6 @@ - This function is available only in versions of PHP 3 after PHP - 3.0.16, and in versions of PHP 4 after 4.0.2. - - - This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If @@ -2220,6 +2215,12 @@ ¬e.sm.uidcheck; + + + + If the destination file already exists, it will be overwritten. + + See also is_uploaded_file, and the section
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwSat Dec 8 14:17:04 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: flock: incorporate user notes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.94 phpdoc/en/functions/filesystem.xml:1.95 --- phpdoc/en/functions/filesystem.xml:1.94 Thu Dec 6 21:14:55 2001 +++ phpdoc/en/functions/filesystem.xml Sat Dec 8 14:17:03 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1152,7 +1152,7 @@ flock allows you to perform a simple reader/writer model which can be used on virtually every platform - (including most Unices and even Windows). The optional 3rd + (including most Unix derivatives and even Windows). The optional third argument is set to &true; if the lock would block (EWOULDBLOCK errno condition) @@ -1160,13 +1160,26 @@ flock returns &true; on success and &false; on error (e.g. when a lock could not be acquired). + + + Because flock requires a file pointer, you may have + to use a special lock file to protect access to a file that you intend + to truncate by opening it in write mode (with a "w" or "w+" argument to + fopen). + + - On most operation systems flock is implemented - at the process level. When using a multithreaded server API like - ISAPI you cannot rely on flock to protect - files against other PHP scripts running in parallel threads of the - same server instance! + flock will not work on NFS and many other networked + file systems. Check your operating system documentation for more + details. + + + On some operating systems flock is implemented at + the process level. When using a multithreaded server API like ISAPI you + may not be able to rely on flock to protect files + against other PHP scripts running in parallel threads of the same server + instance!
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwThu Dec 6 21:14:55 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: copy: incorporate user notes, add see also for section on file uploads Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.93 phpdoc/en/functions/filesystem.xml:1.94 --- phpdoc/en/functions/filesystem.xml:1.93 Thu Dec 6 21:09:09 2001 +++ phpdoc/en/functions/filesystem.xml Thu Dec 6 21:14:55 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -250,9 +250,16 @@ + + + If the destination file already exists, it will be overwritten. + + - See also move_uploaded_file and - rename. + See also move_uploaded_file, + rename, and the section of the manual + about handling file + uploads.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwThu Dec 6 21:09:10 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: copy: see also move_uploaded_file Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.92 phpdoc/en/functions/filesystem.xml:1.93 --- phpdoc/en/functions/filesystem.xml:1.92 Tue Dec 4 15:10:08 2001 +++ phpdoc/en/functions/filesystem.xml Thu Dec 6 21:09:09 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -251,7 +251,8 @@ - See also: rename. + See also move_uploaded_file and + rename.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sterlingTue Dec 4 15:10:08 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Add documentation as per mr. zmievski's request Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.91 phpdoc/en/functions/filesystem.xml:1.92 --- phpdoc/en/functions/filesystem.xml:1.91 Thu Nov 22 17:20:10 2001 +++ phpdoc/en/functions/filesystem.xml Tue Dec 4 15:10:08 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -595,14 +595,15 @@ string fgets int fp - int length + int length 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). + EOF (whichever comes first). If no length is specified, the length + defaults to 1k, or 1024 bytes. If an error occurs, returns &false;.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
gobaThu Nov 22 17:20:10 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: That would be more correct here... Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.90 phpdoc/en/functions/filesystem.xml:1.91 --- phpdoc/en/functions/filesystem.xml:1.90 Thu Nov 22 17:15:13 2001 +++ phpdoc/en/functions/filesystem.xml Thu Nov 22 17:20:10 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2802,7 +2802,7 @@ Creates a file with a unique filename in the specified directory. If the directory does not exist, tempnam may generate a file in the system's temporary directory, and return - the name of it. + the name of that. Prior to PHP 4.0.6, the behaviour of the
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
gobaThu Nov 22 17:15:16 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Some clarification on tempnam and tmpfile, example addded to tmpfile, unlink() added to tempnam. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.89 phpdoc/en/functions/filesystem.xml:1.90 --- phpdoc/en/functions/filesystem.xml:1.89 Thu Nov 22 12:50:57 2001 +++ phpdoc/en/functions/filesystem.xml Thu Nov 22 17:15:13 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2801,7 +2801,8 @@ Creates a file with a unique filename in the specified directory. If the directory does not exist, tempnam may - generate a filename in the system's temporary directory. + generate a file in the system's temporary directory, and return + the name of it. Prior to PHP 4.0.6, the behaviour of the @@ -2821,6 +2822,14 @@ @@ -2830,11 +2839,13 @@ This function's behavior changed in 4.0.3. The temporary file is also created to avoid a race condition where the file might appear in the filesystem between the time the string was generated and before the - the script gets around to creating the file. + the script gets around to creating the file. Note, that you need + to remove the file in case you need it no more, it is not done + automatically. - See also tmpfile. + See also tmpfile, unlink. @@ -2863,6 +2874,18 @@ For details, consult your system documentation on the tmpfile(3) function, as well as the stdio.h header file. + + + + tmpfile example + + + + See also tempnam.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
zak Thu Nov 22 12:50:57 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Clarified the tempnam documentation Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.88 phpdoc/en/functions/filesystem.xml:1.89 --- phpdoc/en/functions/filesystem.xml:1.88 Sat Nov 17 22:07:17 2001 +++ phpdoc/en/functions/filesystem.xml Thu Nov 22 12:50:57 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2787,7 +2787,7 @@ tempnam -Creates unique file name +Create file with unique file name Description @@ -2799,9 +2799,9 @@ - Creates a unique temporary filename in the specified directory. + Creates a file with a unique filename in the specified directory. If the directory does not exist, tempnam may - generate a filename in the system's temporary directory. + generate a filename in the system's temporary directory. Prior to PHP 4.0.6, the behaviour of the @@ -2814,7 +2814,7 @@ tempnam(3) function if in doubt. - Returns the new temporary filename, or the &null; string on + Returns the new temporary filename, or the &false; string on failure. tempnam example
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
gobaSun Nov 11 06:53:09 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Adding that really neat parse_ini_file, with a complete example Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.86 phpdoc/en/functions/filesystem.xml:1.87 --- phpdoc/en/functions/filesystem.xml:1.86 Sun Nov 11 06:26:04 2001 +++ phpdoc/en/functions/filesystem.xml Sun Nov 11 06:53:09 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2173,6 +2173,110 @@ + + +parse_ini_file +Parse a configuration file + + +Description + + + array parse_ini_file + string filename + bool + +process_sections + + + + + + parse_ini_file loads in the + ini file specified in filename, + and returns the settings in it in an associative array. + By setting the last process_sections + parameter to &true;, you get a multidimensional array, with + the section names and settings included. The default + for process_sections is &false; + + + + This function has nothing to do with the + php.ini file. It is already processed, + the time you run your script. This function can be used to + read in your own application's configuration files. + + + + The structure of the ini file is similar to that of + the php.ini's. + + + + Contents of sample.ini + +; This is a sample configuration file +; Comments start with ';', as in php.ini + +[first_section] +one = 1 +five = 5 + +[second_section] +path = /usr/local/bin + + + + + + parse_ini_file example + + + + + + + Would produce: + + +Array +( +[one] => 1 +[five] => 5 +[path] => /usr/local/bin +) +Array +( +[first_section] => Array +( +[one] => 1 +[five] => 5 +) + +[second_section] => Array +( +[path] => /usr/local/bin +) + +) + + + + + @@ -2227,7 +2331,6 @@ -
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
gobaSun Nov 11 06:26:04 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Adding disk_free_space, and diskfreespace as an alias of disk_free_space Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.85 phpdoc/en/functions/filesystem.xml:1.86 --- phpdoc/en/functions/filesystem.xml:1.85 Sat Nov 10 16:49:34 2001 +++ phpdoc/en/functions/filesystem.xml Sun Nov 11 06:26:04 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -311,16 +311,16 @@ - + -diskfreespace +disk_free_space Returns available space in directory Description - float diskfreespace + float disk_free_space string directory @@ -331,12 +331,33 @@ - diskfreespace example + disk_free_space example -$df = diskfreespace("/"); // $df contains the number of bytes +$df = disk_free_space("/"); // $df contains the number of bytes // available on "/" + + + + + + +diskfreespace +Alias of disk_free_space + + +Description + + + float diskfreespace + string directory + + + + This is a deprecated alias of + disk_free_space. + Use that function instead.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml url.xml
jimwWed Oct 31 13:19:29 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml url.xml Log: cross reference parse_url() and pathinfo() Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.83 phpdoc/en/functions/filesystem.xml:1.84 --- phpdoc/en/functions/filesystem.xml:1.83 Wed Oct 17 12:24:00 2001 +++ phpdoc/en/functions/filesystem.xml Wed Oct 31 13:19:29 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -2201,7 +2201,8 @@ See also dirname, - basename and realpath. + basename, parse_url + and realpath. Index: phpdoc/en/functions/url.xml diff -u phpdoc/en/functions/url.xml:1.17 phpdoc/en/functions/url.xml:1.18 --- phpdoc/en/functions/url.xml:1.17Fri Sep 21 18:47:48 2001 +++ phpdoc/en/functions/url.xml Wed Oct 31 13:19:29 2001 @@ -1,5 +1,5 @@ - + URL Functions URLs @@ -78,6 +78,9 @@ various components of the URL that are present. This includes the "scheme", "host", "port", "user", "pass", "path", "query", and "fragment". + + + See also pathinfo.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
philip Thu Sep 27 05:28:06 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Putting new basename() parameter info in typical format. Changing basename() example from .php3 to .php as well. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.81 phpdoc/en/functions/filesystem.xml:1.82 --- phpdoc/en/functions/filesystem.xml:1.81 Fri Sep 21 18:47:38 2001 +++ phpdoc/en/functions/filesystem.xml Thu Sep 27 05:28:05 2001 @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -24,8 +24,7 @@ Given a string containing a path to a file, this function will return the base name of the file. If the filename ends in suffix this will - also be cut off (the suffix parameter was added - in PHP 4.0.7). + also be cut off. On Windows, both slash (/) and backslash @@ -37,12 +36,17 @@ basename example -$path = "/home/httpd/html/index.php3"; -$file = basename ($path); // $file is set to "index.php3" -$file = basename ($path,".php3"); // $file is set to "index" +$path = "/home/httpd/html/index.php"; +$file = basename ($path);// $file is set to "index.php" +$file = basename ($path,".php"); // $file is set to "index" + + + The suffix parameter was added in PHP 4.0.7. + + See also: dirname
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
coarSun Jul 8 09:37:40 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: A little clarification about what you get when you read from an fopen'd http:// URL. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.76 phpdoc/en/functions/filesystem.xml:1.77 --- phpdoc/en/functions/filesystem.xml:1.76 Sat Jul 7 23:54:12 2001 +++ phpdoc/en/functions/filesystem.xml Sun Jul 8 09:37:39 2001 @@ -1140,9 +1140,15 @@ If filename begins with "http://"; (not case sensitive), an HTTP 1.0 connection is opened to the - specified server and a file pointer is returned to the beginning - of the text of the response. A 'Host:' header is sent with the + specified server, the page is requested using the HTTP GET + method, and a file pointer is returned to the beginning + of the body of the response. A 'Host:' header is sent with the request in order to handle name-based virtual hosts. + + + Note that the file pointer allows you to retrieve only the + body of the response; you cannot + access the HTTP response header using this function. Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwSat Jul 7 23:54:13 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: note that umask is applied to mkdir perms Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.75 phpdoc/en/functions/filesystem.xml:1.76 --- phpdoc/en/functions/filesystem.xml:1.75 Sat Jul 7 17:57:27 2001 +++ phpdoc/en/functions/filesystem.xml Sat Jul 7 23:54:12 2001 @@ -2064,6 +2064,8 @@ Note that you probably want to specify the mode as an octal number, which means it should have a leading zero. + The mode is also modified by the current umask, which you + can change using umask. mkdir ("/path/to/my/dir", 0700);
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
danbeck Thu Jun 28 11:46:50 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: reverted changed made in revision 1.70, added note to clarify when http redirects began to be supported Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.71 phpdoc/en/functions/filesystem.xml:1.72 --- phpdoc/en/functions/filesystem.xml:1.71 Wed Jun 27 02:53:54 2001 +++ phpdoc/en/functions/filesystem.xml Thu Jun 28 11:46:49 2001 @@ -1145,6 +1145,10 @@ request in order to handle name-based virtual hosts. + Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because + of this, directories must include trailing slashes. + + If filename begins with "ftp://"; (not case sensitive), an ftp connection to the specified server is opened and a pointer to the requested file is returned. If the server @@ -2291,6 +2295,10 @@ (not case sensitive), an HTTP 1.0 connection is opened to the specified server and the text of the response is written to standard output. + + + Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because + of this, directories must include trailing slashes. If filename begins with "ftp://";
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
Well, I would, but the cvs repository seems inaccessable to me. I've gotten connection refused errors since this morning. Daniel - Original Message - From: <[EMAIL PROTECTED]> Newsgroups: php.doc To: <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 5:12 AM Subject: Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml > > - Does not handle HTTP redirects, so you must include trailing > > - slashes on directories. > > - > > - > > Not everybody runs 4.0.5 yet, maybe it's better to just say that it didn't > work till 404? > > Jeroen > > >
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
That's true.. yes, I can add a note there.. I'll update that this evening. Daniel - Original Message - From: <[EMAIL PROTECTED]> Newsgroups: php.doc To: <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 5:12 AM Subject: Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml > > - Does not handle HTTP redirects, so you must include trailing > > - slashes on directories. > > - > > - > > Not everybody runs 4.0.5 yet, maybe it's better to just say that it didn't > work till 404? > > Jeroen > > >
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
> - Does not handle HTTP redirects, so you must include trailing > - slashes on directories. > - > - Not everybody runs 4.0.5 yet, maybe it's better to just say that it didn't work till 404? Jeroen
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
danbeck Wed Jun 27 08:53:54 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: correcting doc issue #11645 Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.70 phpdoc/en/functions/filesystem.xml:1.71 --- phpdoc/en/functions/filesystem.xml:1.70 Wed Jun 27 06:38:08 2001 +++ phpdoc/en/functions/filesystem.xml Wed Jun 27 08:53:54 2001 @@ -2609,12 +2609,13 @@ generate a filename in the system's temporary directory. - The behaviour of the tempnam function is - system dependent. On Windows the TMP environment variable will - override the dir parameter, on Linux the - TMPDIR environment variable has precedence, while SVR4 will always - use your dir parameter if the directory it - points to exists. Consult your system documentation on the + Prior to PHP 4.0.6, the behaviour of the + tempnam function was system dependent. On + Windows the TMP environment variable will override the + dir parameter, on Linux the TMPDIR + environment variable has precedence, while SVR4 will always use + your dir parameter if the directory it + points to exists. Consult your system documentation on the tempnam(3) function if in doubt.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
danbeck Wed Jun 27 06:38:09 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: documented issue in bug #9124 Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.69 phpdoc/en/functions/filesystem.xml:1.70 --- phpdoc/en/functions/filesystem.xml:1.69 Sat Jun 23 22:10:51 2001 +++ phpdoc/en/functions/filesystem.xml Wed Jun 27 06:38:08 2001 @@ -1145,10 +1145,6 @@ request in order to handle name-based virtual hosts. - Does not handle HTTP redirects, so you must include trailing - slashes on directories. - - If filename begins with "ftp://"; (not case sensitive), an ftp connection to the specified server is opened and a pointer to the requested file is returned. If the server @@ -2295,10 +2291,6 @@ (not case sensitive), an HTTP 1.0 connection is opened to the specified server and the text of the response is written to standard output. - - - Does not handle HTTP redirects, so you must include trailing - slashes on directories. If filename begins with "ftp://";
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jon Tue May 15 16:51:56 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Documentation for the new disk_total_space() function. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.63 phpdoc/en/functions/filesystem.xml:1.64 --- phpdoc/en/functions/filesystem.xml:1.63 Mon May 14 05:37:47 2001 +++ phpdoc/en/functions/filesystem.xml Tue May 15 16:51:56 2001 @@ -330,6 +330,36 @@ + + +disk_total_space +Returns the total size of a directory + + +Description + + + float disk_total_space + string directory + + + + Given a string containing a directory, this function will return + the total number of bytes on the corresponding filesystem or disk + partition. + + + + disk_total_space example + +$df = disk_total_space("/"); // $df contains the total number of + // bytes available on "/" + + + + + + fclose
Re: [PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
on 14/05/01 14:37, Damien Seguy at [EMAIL PROTECTED] wrote: > dams Mon May 14 05:37:48 2001 EDT > > Modified files: > /phpdoc/en/functions filesystem.xml > Log: > Added note into stat. Does anyone with enough experience may check if those comments for stat may be propagated to lstats. I think so. Best regards, Damien Seguy
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
damsMon May 14 05:37:48 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Added note into stat. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.62 phpdoc/en/functions/filesystem.xml:1.63 --- phpdoc/en/functions/filesystem.xml:1.62 Fri May 11 03:16:19 2001 +++ phpdoc/en/functions/filesystem.xml Mon May 14 05:37:47 2001 @@ -2413,7 +2413,8 @@ - Gathers the statistics of the file named by filename. + Gathers the statistics of the file named by filename. + Returns an array with the statistics of the file with the following elements: @@ -2433,7 +2434,14 @@ number of blocks allocated * - only valid on systems supporting the st_blksize type--other - systems (i.e. Windows) return -1 + systems (i.e. Windows) return -1. + + + Returns FALSE in case of error. + + + stat doesn't handle URL as does fopen. + The results of this function are cached. See clearstatcache for more details.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
damsFri May 11 03:16:19 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Updated fclose prototype Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.61 phpdoc/en/functions/filesystem.xml:1.62 --- phpdoc/en/functions/filesystem.xml:1.61 Mon Apr 2 09:43:28 2001 +++ phpdoc/en/functions/filesystem.xml Fri May 11 03:16:19 2001 @@ -339,15 +339,16 @@ Description - int fclose + bool fclose int fp - The file pointed to by fp is closed. + The file pointed to by fp is closed. - Returns true on success and false on failure. + Returns TRUE on success and FALSE + on failure. The file pointer must be valid, and must point to a file
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
danbeck Mon Apr 2 09:43:28 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: added docs for pathinfo Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.60 phpdoc/en/functions/filesystem.xml:1.61 --- phpdoc/en/functions/filesystem.xml:1.60 Mon Mar 26 15:50:26 2001 +++ phpdoc/en/functions/filesystem.xml Mon Apr 2 09:43:28 2001 @@ -2100,6 +2100,61 @@ + + + +pathinfo +Returns information about a file path + + +Description + + + array pathinfo + string path + + + + pathinfo returns an associative array + containing information about path. The + following array elements are returned: + dirname, basename + and extension. + + + + pathinfo Example + + + + + + + Would produce: + + +/www/htdocs +index.html +html + + + + + See also dirname, + basename and realpath. + + + + + pclose
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Mon Mar 26 15:50:26 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Whoops. Forgot filemtime(). Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.59 phpdoc/en/functions/filesystem.xml:1.60 --- phpdoc/en/functions/filesystem.xml:1.59 Mon Mar 26 15:46:08 2001 +++ phpdoc/en/functions/filesystem.xml Mon Mar 26 15:50:26 2001 @@ -862,6 +862,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + Note: This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed. Use
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Mon Mar 26 15:46:09 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Typo fix. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.58 phpdoc/en/functions/filesystem.xml:1.59 --- phpdoc/en/functions/filesystem.xml:1.58 Mon Mar 26 15:44:33 2001 +++ phpdoc/en/functions/filesystem.xml Mon Mar 26 15:46:08 2001 @@ -716,7 +716,7 @@ Note: The atime of a file is supposed to change whenever the data blocks of a file are being read. This can be - costly performancewise when an appliation regularly + costly performancewise when an application regularly accesses a very large number of files or directories. Some Unix filesystems can be mounted with atime updates disabled to increase the performance of such applications; USENET
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Mon Mar 26 15:44:34 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Grammar cleanup. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.57 phpdoc/en/functions/filesystem.xml:1.58 --- phpdoc/en/functions/filesystem.xml:1.57 Mon Mar 26 15:39:25 2001 +++ phpdoc/en/functions/filesystem.xml Mon Mar 26 15:44:33 2001 @@ -752,18 +752,18 @@ The results of this function are cached. See clearstatcache for more details. -Note: In most Unix filesystem, a file is considered - changed, when it's Inode data is changed, that is, when - the permissions, the owner, the group or other metadata - from the Inode is written to. See also - filemtime (this is what you want to use + + Note: In most Unix filesystems, a file is considered + changed when its inode data is changed; that is, when + the permissions, owner, group, or other metadata + from the inode is updated. See also + filemtime (which is what you want to use when you want to create "Last Modified" footers on web pages) and fileatime. -Note: In some Unix texts the ctime of a file is being - referred to as the creation time of the file. This is wrong. - There is no creation time for Unix files in most Unix - filesystems. +Note also that in some Unix texts the ctime of a file is + referred to as being the creation time of the file. This is wrong. + There is no creation time for Unix files in most Unix filesystems. This function will not work on
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
torben Mon Mar 26 15:39:26 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Notes in those functions which do not work on remote files. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.56 phpdoc/en/functions/filesystem.xml:1.57 --- phpdoc/en/functions/filesystem.xml:1.56 Sat Mar 17 11:25:37 2001 +++ phpdoc/en/functions/filesystem.xml Mon Mar 26 15:39:25 2001 @@ -680,9 +680,9 @@ filename exists; false otherwise. - file_exists will not work on remote files; - the file to be examined must be accessible via the server's - filesystem. + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. The results of this function are cached. See @@ -723,6 +723,11 @@ news spools are a common example. On such filesystems this function will be useless. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + @@ -760,6 +765,11 @@ There is no creation time for Unix files in most Unix filesystems. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + @@ -789,6 +799,11 @@ This function does not work on Windows systems + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + @@ -813,6 +828,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + This function does not work on Windows systems @@ -873,6 +893,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + This function does not work on Windows systems @@ -897,6 +922,11 @@ Returns the permissions on the file, or false in case of an error. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + The results of this function are cached. See clearstatcache for more details. @@ -924,6 +954,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + @@ -949,6 +984,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + @@ -1652,6 +1692,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + See also is_file and is_link. @@ -1679,6 +1724,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + See also is_file and is_link. @@ -1741,6 +1791,11 @@ See also is_dir and is_file. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + This function does not work on Windows systems @@ -1776,6 +1831,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + See also is_writable. @@ -1809,6 +1869,11 @@ The results of this function are cached. See clearstatcache for more details. + + This function will not work on remote files; the file to + be examined must be accessible via the server's filesystem. + See also is_readable.
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sniper Sat Mar 17 11:25:37 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Added a note about using 'b' in Windows.. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.55 phpdoc/en/functions/filesystem.xml:1.56 --- phpdoc/en/functions/filesystem.xml:1.55 Wed Mar 7 15:15:13 2001 +++ phpdoc/en/functions/filesystem.xml Sat Mar 17 11:25:37 2001 @@ -1563,6 +1563,13 @@ configuration option will be ignored and no slashes will be stripped from string. + + + On systems which differentiate between binary and text files + (i.e. Windows) the file must be opened with 'b' included in + fopen mode parameter. + + See also fread, fopen, fsockopen, popen, and
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
jimwTue Mar 6 19:45:30 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: someone has the wrong syntax on the brain. please do a make test before commiting, especially to the english docs! Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.53 phpdoc/en/functions/filesystem.xml:1.54 --- phpdoc/en/functions/filesystem.xml:1.53 Tue Mar 6 15:43:03 2001 +++ phpdoc/en/functions/filesystem.xml Tue Mar 6 19:45:30 2001 @@ -1135,14 +1135,14 @@ - - + + The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e. Windows. It's useless on Unix). If not needed, this will be ignored. - - + + You can use the optional third parameter and set it to "1", if you want to search for the file in the - - + + On systems which differentiate between binary and text files (i.e. Windows) the file must be opened with 'b' included in fopen mode parameter. - - + +
[PHP-DOC] cvs: phpdoc /en/functions filesystem.xml
sniper Tue Mar 6 15:43:03 2001 EDT Modified files: /phpdoc/en/functionsfilesystem.xml Log: Added note about fread() on windows.. Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.52 phpdoc/en/functions/filesystem.xml:1.53 --- phpdoc/en/functions/filesystem.xml:1.52 Wed Jan 3 11:17:46 2001 +++ phpdoc/en/functions/filesystem.xml Tue Mar 6 15:43:03 2001 @@ -1134,12 +1134,16 @@ - The mode may contain the letter - 'b'. This is useful only on systems which differentiate between - binary and text files (i.e., it's useless on Unix). If not - needed, this will be ignored. + + The mode may contain the letter + 'b'. This is useful only on systems which differentiate between + binary and text files (i.e. Windows. It's useless on Unix). + If not needed, this will be ignored. + + + You can use the optional third parameter and set it to "1", if you want to search for the file in the include_path, too. @@ -1277,6 +1281,23 @@ // get contents of a file into a string $filename = "/usr/local/something.txt"; $fd = fopen ($filename, "r"); +$contents = fread ($fd, filesize ($filename)); +fclose ($fd); + + + + + + On systems which differentiate between binary and text files + (i.e. Windows) the file must be opened with 'b' included in + fopen mode parameter. + + + + + +$filename = "c:\\files\\somepic.gif"; +$fd = fopen ($filename, "rb"); $contents = fread ($fd, filesize ($filename)); fclose ($fd);