PU13 0 Posted December 5, 2020 Share Posted December 5, 2020 Hello dear communtiy, Im trying to create custom pages keeping the IPS Wrapper and using IPS Pages. Well, one of them requieres of using an external data base, however, I don't know the basic command lines in IPS to make it works. I would like to get a tip about how to establish a connection. I have triied this one, but sadly it didn't work. $connection = \IPS\Db::i( 'external', array( 'sql_host' => 'localhost', 'sql_user' => 'username', 'sql_pass' => 'password', 'sql_database' => 'database_name', 'sql_port' => 3306, 'sql_socket' => '/var/lib/mysql.sock', 'sql_utf8mb4' => true, ) ); Best regards. Link to comment Share on other sites More sharing options...
nonsonokee 16 Posted December 9, 2020 Share Posted December 9, 2020 wtf? i mean, using the Pages App on IPS, you dont need to do this but, you could use the "conf_global.php" format or try with, (basic php stuff) <?php include("conf_global.php"); ?> <?php require \IPS\ROOT_PATH . '/conf_global.php'; ?> this is what IPS use ^ Link to comment Share on other sites More sharing options...
Recommended Posts