Chapter 23. PHP Configuration
In this lesson you will learn how to configure global PHP settings at runtime, using the php.ini
file, and per-directory settings, using .htaccess
.
Configuration Settings
PHP allows you to tune many aspects of its behavior by using a set of configuration directives. These directives can be global for your entire web server, or you can make local changes that apply only to certain scripts.
Using php.ini
PHP's configuration file is named php.ini
. Its location is set at compile time; by default, it is located in /usr/local/lib/php.ini
on Linux/Unix servers and C:\WINDOWS\php.ini
on Windows systems.
The php.ini
file contains a list of configuration directives and their values, separated by equals signs. The default php.ini ...
Get Sams Teach Yourself PHP in 10 Minutes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.