[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
takagi Sat Aug 18 09:01:07 2007 UTC Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: fix build. http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.24&r2=1.25&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.24 phpdoc/en/reference/filesystem/functions/file.xml:1.25 --- phpdoc/en/reference/filesystem/functions/file.xml:1.24 Sat Aug 18 04:37:18 2007 +++ phpdoc/en/reference/filesystem/functions/file.xml Sat Aug 18 09:01:06 2007 @@ -1,5 +1,5 @@ - + http://docbook.org/ns/docbook"; xml:id="function.file"> file @@ -80,22 +80,26 @@ FILE_TEXT - - The content is returned in UTF-8 encoding. You can specify a different - encoding by creating a custom context. This flag cannot be used with - FILE_BINARY. This flag is only available since - PHP 6. - + + + The content is returned in UTF-8 encoding. You can specify a different + encoding by creating a custom context. This flag cannot be used with + FILE_BINARY. This flag is only available since + PHP 6. + + FILE_BINARY - - The content is read as binary data. This is the default setting - and cannot be used with FILE_TEXT. This flag is - only available since PHP 6. - + + + The content is read as binary data. This is the default setting + and cannot be used with FILE_TEXT. This flag is + only available since PHP 6. + +
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
nicobn Sat Aug 18 04:37:18 2007 UTC Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: - Added reference to FILE_TEXT and FILE_BINARY flags - Described the context parameter http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.23&r2=1.24&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.23 phpdoc/en/reference/filesystem/functions/file.xml:1.24 --- phpdoc/en/reference/filesystem/functions/file.xml:1.23 Wed Jun 20 22:24:27 2007 +++ phpdoc/en/reference/filesystem/functions/file.xml Sat Aug 18 04:37:18 2007 @@ -1,5 +1,5 @@ - + http://docbook.org/ns/docbook"; xml:id="function.file"> file @@ -76,6 +76,27 @@ + + + FILE_TEXT + + + The content is returned in UTF-8 encoding. You can specify a different + encoding by creating a custom context. This flag cannot be used with + FILE_BINARY. This flag is only available since + PHP 6. + + + + + FILE_BINARY + + + The content is read as binary data. This is the default setting + and cannot be used with FILE_TEXT. This flag is + only available since PHP 6. + + @@ -84,6 +105,10 @@ context + A context resource created with the + stream_context_create function. + + ¬e.context-support; @@ -123,6 +148,13 @@ + 6.0.0 + +Added support for the FILE_TEXT and +FILE_BINARY flags. + + + 5.0.0 The context parameter was added
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
bjori Tue Apr 3 20:38:30 2007 UTC Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: Document the second parameter correctly (user note) http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.20&r2=1.21&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.20 phpdoc/en/reference/filesystem/functions/file.xml:1.21 --- phpdoc/en/reference/filesystem/functions/file.xml:1.20 Sat Feb 3 08:13:44 2007 +++ phpdoc/en/reference/filesystem/functions/file.xml Tue Apr 3 20:38:29 2007 @@ -1,5 +1,5 @@ - + @@ -11,21 +11,59 @@ arrayfile stringfilename - intuse_include_path + intflags resourcecontext - Identical to file_get_contents, except that + Similiar to file_get_contents, except that file returns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached. Upon failure, file returns &false;. - You can use the optional use_include_path parameter - and set it to "1", if you want to search for the file in the include_path, too. + The optional parameter flags can be one, or more, of + the following constants: + + + + FILE_USE_INCLUDE_PATH + + + + Search for the file in the include_path. + + + + + + FILE_IGNORE_NEW_LINES + + + + Do not add newline at the end of each array element + + + + + + FILE_SKIP_EMPTY_LINES + + + + Skip empty lines + + + + + + +Prior to PHP 5.0.0 the flags parameter only +covered include_path and was +enabled with 1. + + @@ -50,7 +88,7 @@ &tip.fopen-wrapper; -Each line in the resulting array will include the line ending, so you +Each line in the resulting array will include the line ending, unless FILE_IGNORE_NEW_LINES is used, so you still need to use rtrim if you do not want the line ending present.
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
poz Sat Nov 18 14:37:53 2006 UTC Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: typo http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.18 phpdoc/en/reference/filesystem/functions/file.xml:1.19 --- phpdoc/en/reference/filesystem/functions/file.xml:1.18 Thu Oct 26 02:17:14 2006 +++ phpdoc/en/reference/filesystem/functions/file.xml Sat Nov 18 14:37:53 2006 @@ -1,5 +1,5 @@ - + @@ -72,7 +72,7 @@ fopen, fsockopen, popen, file_get_contents, include, and - steream_context_create + stream_context_create
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
vrana Fri Oct 14 03:11:17 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: More similar to file_get_contents (bug #34867) http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/file.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.16 phpdoc/en/reference/filesystem/functions/file.xml:1.17 --- phpdoc/en/reference/filesystem/functions/file.xml:1.16 Wed Apr 14 01:28:54 2004 +++ phpdoc/en/reference/filesystem/functions/file.xml Fri Oct 14 03:11:15 2005 @@ -1,5 +1,5 @@ - + @@ -15,7 +15,7 @@ resourcecontext - Identical to readfile, except that + Identical to file_get_contents, except that file returns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached. Upon failure, file
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
vrana Fri Jan 9 11:54:16 2004 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: Dot Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.13 phpdoc/en/reference/filesystem/functions/file.xml:1.14 --- phpdoc/en/reference/filesystem/functions/file.xml:1.13 Sat Dec 20 20:05:38 2003 +++ phpdoc/en/reference/filesystem/functions/file.xml Fri Jan 9 11:54:16 2004 @@ -1,5 +1,5 @@ - + @@ -67,7 +67,7 @@ - Context support was added with PHP 5.0.0 + Context support was added with PHP 5.0.0.
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
didou Mon Dec 1 13:14:09 2003 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: fix #26489 Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.10 phpdoc/en/reference/filesystem/functions/file.xml:1.11 --- phpdoc/en/reference/filesystem/functions/file.xml:1.10 Mon Jun 16 08:57:32 2003 +++ phpdoc/en/reference/filesystem/functions/file.xml Mon Dec 1 13:14:09 2003 @@ -1,5 +1,5 @@ - + @@ -51,7 +51,7 @@ 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 + still need to use rtrim if you do not want the line ending present.
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
jan Fri Oct 18 16:47:26 2002 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: - file is now binary safe Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.4 phpdoc/en/reference/filesystem/functions/file.xml:1.5 --- phpdoc/en/reference/filesystem/functions/file.xml:1.4 Thu Oct 17 22:15:02 2002 +++ phpdoc/en/reference/filesystem/functions/file.xml Fri Oct 18 16:47:26 2002 @@ -1,5 +1,5 @@ - + @@ -56,10 +56,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. + return the contents of a file as a string. + + + In PHP 4.3.0 file became binary safe. -¬e.not-bin-safe; &tip.fopen-wrapper; See also readfile, -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions file.xml
philip Thu Oct 17 22:15:03 2002 EDT Modified files: /phpdoc/en/reference/filesystem/functions file.xml Log: Rewrote example using foreach instead of while/list. Expanded the comments. See also file_get_contents() and include(). Index: phpdoc/en/reference/filesystem/functions/file.xml diff -u phpdoc/en/reference/filesystem/functions/file.xml:1.3 phpdoc/en/reference/filesystem/functions/file.xml:1.4 --- phpdoc/en/reference/filesystem/functions/file.xml:1.3 Thu Sep 26 09:56:53 2002 +++ phpdoc/en/reference/filesystem/functions/file.xml Thu Oct 17 22:15:02 2002 @@ -1,5 +1,5 @@ - + @@ -37,14 +37,17 @@ @@ -61,7 +64,8 @@ See also readfile, fopen, fsockopen, and - popen. + popen, and file_get_contents, + and include. -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php