Function __global->cms_fgets

Definitions

sources/files.php

  • Gets line from file pointer. Supports character set conversion.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$myfile resource No No required parameter N/A N/A The file pointer
$charset ?string No No required parameter N/A N/A The character set to read with (likely found from cms_fopen_text_read) (null: website character set)

Returns

  • The string read (false: error)
  • Type: ~string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Gets line from file pointer. Supports character set conversion.
 *
 * @param  resource $myfile The file pointer
 * @param  ?string $charset The character set to read with (likely found from cms_fopen_text_read) (null: website character set)
 * @return ~string The string read (false: error)
 */

function cms_fgets($myfile, ?string $charset)