Function __global->cms_fopen_text_write
Definitions
sources/files.php
- Open a file for writing, with a BOM.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | File path |
| $locking | boolean | No | No | False | N/A | N/A | File lock (if set, you must unlock with LOCK_UN before fclose) |
| $mode | ?string | No | No | Null | N/A | N/A | File mode (null: detect based on $locking) |
| $charset | ?string | No | No | Null | N/A | N/A | Character set to write with (null: website character set) |
Returns
- The file handle (false: could not be opened)
- Type: ~resource
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Open a file for writing, with a BOM.
*
* @param PATH $path File path
* @param boolean $locking File lock (if set, you must unlock with LOCK_UN before fclose)
* @param ?string $mode File mode (null: detect based on $locking)
* @param ?string $charset Character set to write with (null: website character set)
* @return ~resource The file handle (false: could not be opened)
*/
function cms_fopen_text_write(string $path, bool $locking = false, ?string $mode = null, ?string $charset = null)
* Open a file for writing, with a BOM.
*
* @param PATH $path File path
* @param boolean $locking File lock (if set, you must unlock with LOCK_UN before fclose)
* @param ?string $mode File mode (null: detect based on $locking)
* @param ?string $charset Character set to write with (null: website character set)
* @return ~resource The file handle (false: could not be opened)
*/
function cms_fopen_text_write(string $path, bool $locking = false, ?string $mode = null, ?string $charset = null)

