PHP 手冊
上一頁 |  | 下一頁

# I.Apache-specific Functions

# 介紹

These functions are only available when running PHP as an Apache module.

> 備注: PATH_TRANSLATED server variable is no longer set implicitly under Apache 2 SAPI in contrast to the situation in Apache 1, where it is set to the same value as the SCRIPT_FILENAME server variable when it is not populated by Apache. This change was made to comply with the CGI specification. Please refer to bug #23610 for further information.

# 安裝

For PHP installation on Apache see the Apache section in the installation chapter.

# 執行時期組態

The behaviour of the Apache PHP module is affected by settings in `php.ini`. Configuration settings from `php.ini` may be overridden by php_flag settings in the server configuration file or local `.htaccess` files.

示範 1.Turning off PHP parsing for a directory using `.htaccess`
    php_flag engine off

表格 1.Apache configuration options

Name | Default | Changeable
--- | --- | ---
engine | On | PHP_INI_ALL
child_terminate | Off | PHP_INI_ALL
last_modified | Off | PHP_INI_ALL
xbithack | Off | PHP_INI_ALL

For further details and definition of the PHP_INI_* constants see ini_set().

這裡為簡短的結構指令說明。

engine boolean

  Turns PHP parsing on or off. This directive is really only useful in the Apache module version of PHP. It is used by sites that would like to turn PHP parsing on and off on a per-directory or per-virtual server basis. By putting `engine off` in the appropriate places in the `httpd.conf` file, PHP can be enabled or disabled.

child_terminate boolean

  Specify whether PHP scripts may request child process termination on end of request, see also apache_child_terminate().

last_modified boolean

  Send PHP scripts modification date as Last-Modified: header for this request.

xbithack boolean

  Parse files with executable bit set as PHP regardless of their file ending.

# 資源類型

這個延伸沒有定義任何資源。

# 預先定義常數

這個延伸沒有定義任何常數。

上一頁 | 最開頭 | 下一頁
函數參考 | 上一層 | apache_child_terminate