Author Topic: WHEN FOUND THE FILE CONF.PHP  (Read 272 times)

weaponero

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 1
    • View Profile
WHEN FOUND THE FILE CONF.PHP
« on: October 25, 2022, 11:21:03 pm »
HI MY FRIENDS

IM USING PQGRID FOR INSERT AND EDIT, IM KNOW WHO IS THE NEXT FILE Failed opening required 'conf.php'

IM INTERESTING KNOW WHEN ARE THIS FILE.

I NEED TO HELP PLEASE


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: WHEN FOUND THE FILE CONF.PHP
« Reply #1 on: October 26, 2022, 05:39:58 pm »
conf.php is a php file to define some global variables and function to get database handle

Code: [Select]
<?php

.........define variables like DB_HOSTNAMEetc ..

function 
getDBH(){
    
$dsn 'mysql:host='.DB_HOSTNAME.';dbname='.DB_NAME;
    
$options = array(
        
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
        
PDO::ATTR_EMULATE_PREPARES => false //to get native data types from prepared statements.(> PHP 5.3 && mysqlnd)
    
);
    
$dbh = new PDO($dsnDB_USERNAMEDB_PASSWORD$options);
    return 
$dbh;
}
?>


Hope it helps