Jump to content

IPS Pages - Data base


PU13

Recommended Posts

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

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...