© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
M. SimonAn Introduction to PHP https://doi.org/10.1007/979-8-8688-0177-8_11

11. A Configuration System

Mark Simon1  
(1)
Ivanhoe VIC, VIC, Australia
 

A number of pages we’ve developed so far include arbitrary values, such as the dimensions of the images. Because they’re not part of the logic, we put them in an array called $CONFIG near the top of the code, promising to do something with them later. Now, this is later.

Many packages use a special file format for configuration options. This includes PHP’s default settings, php.ini, and the site’s .user.ini file. This format is known as an ini file.

We’re going to develop our own ini file with our site configuration ...

Get An Introduction to PHP : Learn PHP 8 to Create Dynamic Websites 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.