July 03, 2004

mod_php4的一些参数设置

语法 ======

php_value name value
-- This sets the value of the specified variable.

php_flag name on|off
-- This is used to set a Boolean configuration option.
php_admin_value name value
-- This sets the value of the specified variable.
"Admin" configuration settings can only be set from within
the main Apache configuration files, and not from .htaccess files.

php_admin_flag name on|off
-- This is used to set a Boolean configuration option.

例程
========
<IfModule mod_php4.c>
php_value include_path ".:/usr/local/lib/php"
php_admin_flag safe_mode on
</IfModule>
<IfModule mod_php3.c>
php3_include_path ".:/usr/local/lib/php"
php3_safe_mode on
</IfModule>

常用
=========
php_flag expose_php Off
php_flag register_globals Off
#variables_order EGPCS

auto_prepend_file string
auto_append_file string
default_charset string
include_path

  我对php不熟悉,今天才知,这些参数的运用,可以更加灵活地进行网站建设。举例如下:


AddType application/x-httpd-php .html .htm
php_value auto_append_file /path/to/file.php
可以在apache输出的每个html或htm页面后追加执行文件file.php.
  利用这个功能,可以很简单地将Stephen的referrer程序,用于一个blog站点所有页面,而不仅仅是首页。

参考文献:
http://worldhello.net/doc/website_howto/apache-conf.html

Posted by Hilton at July 3, 2004 11:01 AM | TrackBack
Comments

nice site!!!

Posted by: pornstar at November 2, 2004 07:58 PM

Escort-Finder's
Escort Reviews-Photo Directory
http://escort.keybase.biz

Posted by: Escort at October 27, 2004 08:04 AM

nice site!!!

Posted by: briana banks at October 27, 2004 03:26 AM

Viruses, anti-viruses, events, facts and commentary.

Posted by: Virus Information Library at October 23, 2004 12:48 PM
Post a comment









Remember personal info?