PHP??™s File Upload/Resource Directives
Several configuration directives are available for fine-tuning PHP??™s file-upload capabilities.
These directives determine whether PHP??™s file-upload support is enabled, as well
as the maximum allowable uploadable file size, the maximum allowable script memory
allocation, and various other important resource benchmarks. These directives are
introduced next.
file_uploads = On | Off
Scope: PHP_INI_SYSTEM; Default value: 1
The file_uploads directive determines whether PHP scripts on the server can accept
file uploads.
max_execution_time = integer
Scope: PHP_INI_ALL; Default value: 30
The max_execution_time directive determines the maximum amount of time, in
seconds, that a PHP script will execute before registering a fatal error.
memory_limit = integerM
Scope: PHP_INI_ALL; Default value: 8M
The memory_limit directive sets a maximum allowable amount of memory, in megabytes,
that a script can allocate. Note that the integer value must be followed by M for this
setting to work properly. This prevents runaway scripts from monopolizing server
memory and even crashing the server in certain situations. This directive takes effect
only if the --enable-memory-limit flag is set at compile time.
upload_max_filesize = integerM
Scope: PHP_INI_SYSTEM; Default value: 2M
The upload_max_filesize directive determines the maximum size, in megabytes, of
an uploaded file.
Pages:
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469