Function __global->read_text_file
Definitions
sources/textfiles.php
- Read a text file, using the _custom system.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $codename | string | No | No | required parameter | N/A | N/A | The file name (without .txt) |
| $lang | ?LANGUAGE_NAME | No | No | Null | N/A | N/A | The language to load from (null: none) (blank: search) |
| $missing_blank | boolean | No | No | False | N/A | N/A | Whether to tolerate missing files |
Returns
- The file contents
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Read a text file, using the _custom system.
*
* @param string $codename The file name (without .txt)
* @param ?LANGUAGE_NAME $lang The language to load from (null: none) (blank: search)
* @param boolean $missing_blank Whether to tolerate missing files
* @return string The file contents
*/
function read_text_file(string $codename, ?string $lang = null, bool $missing_blank = false) : string
* Read a text file, using the _custom system.
*
* @param string $codename The file name (without .txt)
* @param ?LANGUAGE_NAME $lang The language to load from (null: none) (blank: search)
* @param boolean $missing_blank Whether to tolerate missing files
* @return string The file contents
*/
function read_text_file(string $codename, ?string $lang = null, bool $missing_blank = false) : string

