Using Different Configuration Settings in Production
Let's create a new .ini file to emulate the production environment and learn how to catch exceptions.
We'll cover the following
Using multiple .ini files
Once the website has been deployed to a production environment, the display_errors
setting should be Off
.
While developing locally, you can simulate this by using multiple .ini
files.
The php.ini
file we have been using so far will be the development version.
We will create another .ini
file called php-prod.ini
, which will contain settings that mimic the production environment.
Get hands-on with 1400+ tech skills courses.