Jump to content

Integrating 2 scripts, config.php question


yakabod

Recommended Posts

I have 2 config files.  One for software #1 and another for software #2.  Now, my question is,  Is it ok to combine these 2 so when I create a php file, I can include only 1 config file?  How can I properly combine software #1 to software #2?  Since the mysql information is the same, I keep it the way it is.  The code

 

// SELECT ADMIN INFO
$admin_info = mysql_fetch_assoc(mysql_query("SELECT * FROM faq_admin"));?>

 

is all I need to add onto software #2, correct right? And I can add that anywhere in software #2?

 

 

Software #1:

<?
// SET MYSQL INFORMATION
$mysql_host = "localhost";
$mysql_database = "example1";
$mysql_username = "examplepass";
$mysql_password = "example1";

// CONNECT TO MYSQL DATABASE
$mysql_connect = mysql_connect("$mysql_host", "$mysql_username", "$mysql_password");
mysql_select_db("$mysql_database");

// SELECT ADMIN INFO
$admin_info = mysql_fetch_assoc(mysql_query("SELECT * FROM faq_admin"));?>

 

Software 2:

//Your database settings
$config["hostname"] 								= 'localhost'; // example 'localhost';
$config["dbusername"]								= 'example1';     // example 'myusername';
$config["dbpassword"] 								= 'examplepass';   // example 'mypassword';
$config["dbname"] 									= 'example1';    // example 'mydatabase';

//To debug ffmpeg set $debugmode to 1; (default is 0)
//You can also create a log file to help with debug
$log_encoder                                        = "no";  //change to "yes" to create a log file of encoding (created in /logs)
$debugmodex                                         = 0;    //change to 1 to see output on screen (only if logging fails)


//path to php
/////////////

$path_to_php                                        = "/usr/bin/php";

$login_out                                           = $config["login_text"];
$login_out_link                                      = "login.php";
$register_menu                                       = $config["register_menu"];
$register_menu_link                                  = "login.php";
$auto_play 											 = $config["auto_play"];
$splash_image 										 = "images/splash_play.jpg";
$video_buffer 										 = $config["video_buffer_time"];

?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.