Forum Moderators: coopster
$username = "mysqlusername";
$pass = "mysqlpass";
$db = "mysqldb;
...
Is there some good way to protect these files from being remotely included? Since this is public script anyone could do something like this:
<?php
include("http://www.example.com/config.php");
echo $username;
echo $pass;
?>
Thanks in advance.
Good PHP solutions to small problems [webmasterworld.com]
/home/privatefiles
and you keep your web pages in:
/home/www
and you include the files with:
include('/home/privatefiles/config.php');
This way your private files aren't accessible to anyone that isn't on the local machine. Hope this helps.
Performance and Multiple Include User Functions [webmasterworld.com]
Best practice in placing db connection file/folder [webmasterworld.com]
MySQL queries spanning multiple tables with different keys [webmasterworld.com] message #7 has some very good links