NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

PHP - phpinfo

Trieda

Koreň \ Bez triedy

Metóda - phpinfo

(PHP 4, PHP 5, PHP 7)

The phpinfo() function is used for displaying a detail information about the PHP's configuration.

Warning: Do not output phpinfo() in public sections of your website, because it contains information that could be exploited by hackers.

**Note: ** In the CLI mode (the Command Line Interface), the function returns paintext instead of HTML code.

Procedurálne

  • function phpinfo (int $what = INFO_ALL) : bool

Parametre

NázovDátový typPredvolená hodnotaPopis
$whatint INFO_ALL

Is used to specify which information should be printed. Constants can be combined using the | operator.

  • INFO_GENERAL (1) - general information about PHP, system, etc.
  • INFO_CREDITS (2) - PHP credits
  • INFO_CONFIGURATION (4) - PHP configuration (local and master values)
  • INFO_MODULES (8) - loaded modules and their settings
  • INFO_ENVIRONMENT (16) - information about environment variables ($_ENV)
  • INFO_VARIABLES (32) - predefined variables from _ENV, _GET,

    _POST, _COOKIE and _SERVER.

  • INFO_LICENSE (64) - information about license
  • INFO_ALL (-1) - all the information above

Mávratovej hodnoty

Vracia: bool

Returns true on success, false otherwise.

Príklady

<?php
phpinfo(); // displays all the information
phpinfo(INFO_LICENSE); // displays the information about the license
phpinfo(INFO_LICENSE | INFO_CREDITS); // displays the information about the license and credits

Súvisiace manuály

      • function ini_set (string $varname, string $newvalue) : string
      • function phpversion (string $extension) : string
      Aktivity