最後更新: 2017-10-23
.htaccess
# vhosts 的 config 裡面要有
# Apache allow php_admin_value
AllowOverride Options
i.e.
php_flag log_errors on php_value error_log /home/path/public_html/domain/PHP_errors.log
php_flag 與 php_admin_flag 的分別
php_flag
it's used to set boolean values (on/off)for options.
php_admin_flag
This can only be used within the Apache configuration (general config or in a Virtual Host) <= 不可以用在 .htaccess
* can not be used in a .htaccess
* you can not overwrite the setting from within your application using ini_set()
php_value & php_admin_value
for everything
include_path & auto_prepend_file
php_value include_path /path/to/file
The file must be inside PHP's include_path.
So you must either set the file's directory to be in the include_path inside php.ini,
or do it in the .htaccess with a php_value statement.
php_value include_path ".:/path/to/file_directory" php_value auto_prepend_file "file.php"