Ir al contenido principal

setPhpIniEntries

Callable

  • setPhpIniEntries(php: UniversalPHP, entries: Record<string, unknown>, path?: string): Promise<void>

  • Rewrites an ini file with the given entries.

    PHP reads php.ini first, then every .ini file in PHP_INI_SCAN_DIR, and the last value read wins. Pass path to write to one of those files, such as the .ini file an extension ships. Entries already in the file are kept.


    Parameters

    • php: UniversalPHP

      The PHP instance.

    • entries: Record<string, unknown>

      The entries to write to the ini file.

    • path: string = PHP_INI_PATH

      The ini file to rewrite. Defaults to the php.ini file.

    Returns Promise<void>