← All docs

fopen()

Opens file or URL.

fopen()

function fopen(string $filename, string $mode, bool $use_include_path = false, mixed $context = null): mixed

Opens file or URL.

Parameters:

  • $filename (string)
  • $mode (string)
  • $use_include_path (bool), default false, optional
  • $context (mixed), default null, optional

Returns: mixed

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how fopen is implemented in the compiler, see the internals page.