Spracovanie dát

Tabuľka H-4. Konfiguračné voľby spracovania dát

NázovŠtandardneZmeniteľný
track_vars"On"PHP_INI_??
arg_separator.output"&"PHP_INI_ALL
arg_separator.input"&"PHP_INI_SYSTEM|PHP_INI_PERDIR
variables_order"EGPCS"PHP_INI_ALL
register_globals"Off"PHP_INI_PERDIR|PHP_INI_SYSTEM
register_argc_argv"On"PHP_INI_PERDIR|PHP_INI_SYSTEM
register_long_arrays"On"PHP_INI_PERDIR|PHP_INI_SYSTEM
post_max_size"8M"PHP_INI_SYSTEM|PHP_INI_PERDIR
gpc_order"GPC"PHP_INI_ALL
auto_prepend_file""PHP_INI_SYSTEM|PHP_INI_PERDIR
auto_append_file""PHP_INI_SYSTEM|PHP_INI_PERDIR
default_mimetype"text/html"PHP_INI_ALL
default_charset"iso-8859-1"PHP_INI_ALL
always_populate_raw_post_data"0"PHP_INI_SYSTEM|PHP_INI_PERDIR
allow_webdav_methods"0"PHP_INI_SYSTEM|PHP_INI_PERDIR

Tu je krátke vysvetlenie konfiguračných direktív.

track_vars boolean

Ak je zapnutý, potom sa premenné Environment, GET, POST, Cookie a Server dajú nájsť v globálnych asociatívnych poliach $_ENV, $_GET, $_POST, $_COOKIE a $_SERVER.

Od PHP 4.0.3 je track_vars vždy zapnutá.

arg_separator.output string

Oddelovač používaný v PHP generoval URL-ka na oddelenie argumentov.

arg_separator.input string

Zoznam oddelovačov použivaných PHP-čkom na analýzu vstupných URL na premenné.

Poznámka: Každý znak v tejto direktíve sa považuje ako oddelovač!

variables_order string

Nastavte poradie analýzy premenných EGPCS (Environment, GET, POST, Cookie, Server). Východzie nastavenie tejto direktívy je "EGPCS". Napríklad, nastavenie na "GP" spôsobí, že PHP bude kompletne ignorovať enviromentálne premenné, premenné cookies a server a bude prepisovať všetky premenné metódy GET premennými metody POST rovnakého názvu.

Tiež pozri register_globals.

register_globals boolean

Hovorí, či registrovať alebo neregistrovať premenné EGPCS (Environment, GET, POST, Cookie, Server) ako globálne premenné. Napríklad; ak register_globals = on, URL http://www.example.com/test.php?id=3 vyprodukuje $id. Alebo $DOCUMENT_ROOT z $_SERVER['DOCUMENT_ROOT']. Môžete ju chcieť nastaviť na off, ak si nechcete urobiť neporiadok v globalnom poli vašich skriptov s užívateľskými dátami. Od PHP 4.2.0, je východzia hodnota tejto direktívy off. Je preferované prejsť si radšej PHP Preddefinované premenné , sko superglobály: $_ENV, $_GET, $_POST, $_COOKIE a $_SERVER. Prosím, prečítajte si kapitolu bezpečnosti o Používaní register_globals pre súvicsiace informácie.

Upozorňujeme, že register_globals sa nedajú nastaviť počas runtime (ini_set()). I keď, môžete použiť .htaccess ak váš to váš host umožňuje ako je popísané vyššie. Príklad .htaccess položky: php_flag register_globals on.

Poznámka: register_globals je ovplyvnená direktívou variables_order.

register_argc_argv boolean

Hovorí PHP, či má deklarovať argv & argc premenné (ktoré by obsahoval GET informáciu).

Tiež pozri command line. Táto direktíva bola sprístupnená v PHP 4.0.0 a a pred tým bola vždy "on".

register_long_arrays boolean

Tells PHP whether or not to register the deprecated long $HTTP_*_VARS type predefined variables. When On (default), long predefined PHP variables like $HTTP_GET_VARS will be defined. If you're not using them, it's recommended to turn them off, for performance reasons. Instead, use the superglobal arrays, like $_GET.

This directive became available in PHP 5.0.0.

post_max_size integer

Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize.

If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.

gpc_order string

Set the order of GET/POST/COOKIE variable parsing. The default setting of this directive is "GPC". Setting this to "GP", for example, will cause PHP to completely ignore cookies and to overwrite any GET method variables with POST-method variables of the same name.

Poznámka: This option is not available in PHP 4. Use variables_order instead.

auto_prepend_file string

Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the include() function, so include_path is used.

The special value none disables auto-prepending.

auto_append_file string

Specifies the name of a file that is automatically parsed after the main file. The file is included as if it was called with the include() function, so include_path is used.

The special value none disables auto-appending.

Poznámka: If the script is terminated with exit(), auto-append will not occur.

default_mimetype string

default_charset string

As of 4.0b4, PHP always outputs a character encoding by default in the Content-type: header. To disable sending of the charset, simply set it to be empty.

always_populate_raw_post_data boolean

Always populate the $HTTP_RAW_POST_DATA variable.

allow_webdav_methods boolean

Allow handling of WebDAV http requests within PHP scripts (eg. PROPFIND, PROPPATCH, MOVE, COPY, etc..) If you want to get the post data of those requests, you have to set always_populate_raw_post_data as well.

See also: magic_quotes_gpc, magic_quotes_runtime, and magic_quotes_sybase.