Skip to content

Commit

Permalink
Added better way to determine whether app is running on local or remo…
Browse files Browse the repository at this point in the history
…te server, regardless of domain.
  • Loading branch information
Andy committed May 24, 2012
1 parent a1149b0 commit 2161e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.php
@@ -1,7 +1,7 @@
<?php
include 'private.php'; // passwords and DB info for the DB on caerphoto.com

if (preg_match('/caerphoto\.com/', $_SERVER['SERVER_NAME']) === 0) {
if (file_exists('../local.txt')) {
$db_conn = "mysql:host=localhost;dbname=caerpho_minipets;unix_socket=/tmp/mysql.sock";
$username = "";
$pw = "";
Expand Down

0 comments on commit 2161e4b

Please sign in to comment.