JoshuaLuke
Posting Freak
- Jan 29, 2012
- 529
- 51
Hey,
As some of you may know, im developing ParaCMS. Ive come across a small problem.
I have a code:
and I want to put it in a global.php document. Rather than having it in my config.php. I have tried to use include 'config.php' in my global.php page, but its failing. CODE:
Config:
Global:
If you can sort my problams, please tell me
As some of you may know, im developing ParaCMS. Ive come across a small problem.
I have a code:
Code:
mysql_connect($CONFIG['mysql']['hostname'],$CONFIG['mysql']['username'],$CONFIG['mysql']['password']) or die("Could not connect to server, error: ".mysql_error());
mysql_select_db($CONFIG['mysql']['database']) or die("Could not connect to database, error: ".mysql_error());
Config:
Code:
<?php
/*=======================================================================
| Paranormal CMS - A Habbo hotel Content Managment System
| #######################################################################
| Copyright 2012 Josh 'JoshuaLuke or FreddyZoom' All Rights Reserved
| This is a free CMS: You may not distribute this under ANY condition
| without the owners permission. Failure to do so may result in
| legal action.
| #######################################################################
| This program is distributed in the hope that it will be useful and
| efficient for your needs.
\======================================================================*/
// Below is the configuration for MySQL. Please fill all of it out correctly in order for the website to function
$CONFIG['mysql']['hostname'] = 'localhost'; // MySQL Host
$CONFIG['mysql']['username'] = 'root'; // MySQL Username
$CONFIG['mysql']['password'] = 'hello12'; // MySQL Password
$CONFIG['mysql']['database'] = 'phx'; // MySQL Database
?>
Global:
Code:
<?php
include_once 'config.php';
mysql_connect($CONFIG['mysql']['hostname'],$CONFIG['mysql']['username'],$CONFIG['mysql']['password']) or die("Could not connect to server, error: ".mysql_error());
mysql_select_db($CONFIG['mysql']['database']) or die("Could not connect to database, error: ".mysql_error());
?>
If you can sort my problams, please tell me