Function __global->readfile

Definitions

sources_custom/phpstub.php

  • Outputs a file.Call cms_ob_end_clean() first, else too much memory will be used.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filename PATH No No required parameter N/A N/A The filename
$use_include_path boolean No No False N/A N/A Whether to search within the include path
$context ?resource No No Null N/A N/A A stream context to attach to (null: no special context)

Returns

  • The number of bytes read (false: error)
  • Type: ~integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Outputs a file.Call cms_ob_end_clean() first, else too much memory will be used.
 *
 * @param  PATH $filename The filename
 * @param  boolean $use_include_path Whether to search within the include path
 * @param  ?resource $context A stream context to attach to (null: no special context)
 * @return ~integer The number of bytes read (false: error)
 */

function readfile(string $filename, bool $use_include_path = false, $context = null)