yakabod Posted October 5, 2007 Share Posted October 5, 2007 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 https://forums.phpfreaks.com/topic/72036-integrating-2-scripts-configphp-question/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.