Apache Module mod_env
Description: Allows Apache to modify or erase environment variables sent to CGI scripts and SSI pages
Module Name: Env_module
Source file: mod_env.c
This module is used to control environment variables that are transmitted to CGI scripts and SSI pages.
The transmitted environment variable can come from a shell that invokes the httpd process, or from a variable set (set) or Undo (unset) in the configuration process.
setenv directives
Description: Set Environment variables
Syntax: setenv env-variable value
Scope: Server config, virtual host, directory,. htaccess
Overlays: FileInfo
Module: mod_env
Sets an environment variable that is routed to the CGI script and SSI pages.
Setenv Site_path/home/fdipzone/demosite
unsetenv directives
Description: Delete an environment variable
Syntax: Unsetenv env-variable [env-variable] ...
Scope: Server config, virtual host, directory,. htaccess
Overlays: FileInfo
Module: mod_env
Deletes one or more environment variables in an environment that is routed to CGI scripts and SSI pages.
Unsetenv Site_path site_path1 Site_path2
For more information on the Apache MOD_ENV module please see here
How to use:
In the PHP program, if you want to connect to the database, we will write a config file below to save the connection information of the database.
<?php return
Array ('
database ' => array (
' host ' => ' 192.168.1.1 ',
' user ' => ') Fdipzone ',
' password ' => ' 123456 ',
),
);
? >
These are more sensitive information that can be saved using the Apache mod_env.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/PHP/