Skip to navigation
Simple php check in a php config on what server the webapp is running
09.05.20
example for a codeigniter config file: if(in_array($_SERVER['SERVER_NAME'],['','127.0.0.1'])): $db['default']['hostname'] = 'scala_db'; else: $db['default']['hostname'] = 'localhost'; endif;
https://www.php.net/manual/en/reserved.variables.server.php
Reply
Anonymous
Information Epoch 1758013049
Live free or die.
Home
Notebook
Contact us