From 5434e2e2f0c6d6fdebf17c78c33594de41fe1bba Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Sat, 28 Jun 2003 20:59:12 +0000 Subject: [PATCH] Clarify x and x+ modes. They generate E_WARNING and false when file exists, and attempt to create the file if the file does not yet exist. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@133540 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fopen.xml | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/reference/filesystem/functions/fopen.xml b/reference/filesystem/functions/fopen.xml index c8f84b86d0..480f411251 100644 --- a/reference/filesystem/functions/fopen.xml +++ b/reference/filesystem/functions/fopen.xml @@ -1,5 +1,5 @@ - + @@ -120,26 +120,26 @@ 'x' Create and open for writing only; place the file pointer at the - beginning of the file. - If the file already exists, the fopen - call will fail. - This is equivalent to specifying O_EXCL|O_CREAT flags - for the underlying open(2) system call. - This option is supported in PHP 4.3.2 and later, and only for local - files. + beginning of the file. If the file already exists, the + fopen call will fail by returning &false; and + generating an error of level E_WARNING. If + the file does not exist, attempt to create it. This is equivalent + to specifying O_EXCL|O_CREAT flags for the + underlying open(2) system call. This option is + supported in PHP 4.3.2 and later, and only works for local files. 'x+' - Create and open for reading and writing; place the file pointer at the - beginning of the file. - If the file already exists, the fopen - call will fail. - This is equivalent to specifying O_EXCL|O_CREAT flags - for the underlying open(2) system call. - This option is supported in PHP 4.3.2 and later, and only for local - files. + Create and open for reading and writing; place the file pointer at + the beginning of the file. If the file already exists, the + fopen call will fail by returning &false; and + generating an error of level E_WARNING. If + the file does not exist, attempt to create it. This is equivalent + to specifying O_EXCL|O_CREAT flags for the + underlying open(2) system call. This option is + supported in PHP 4.3.2 and later, and only works for local files.