尝试在本地浏览php文件时出现此错误
[Fri Apr 13 19:16:40 2012] [alert] [client 127.0.0.1] C:/AppServ/www/hr-website/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://127.0.0.1/
Run Code Online (Sandbox Code Playgroud)
问题是什么 ?
我使用以下php代码连接到mysql数据库.
$hostname = "hostname.com";
$database = "dbtest";
$username = "admin";
$password = "pass123";
$connect = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database);
Run Code Online (Sandbox Code Playgroud)
此代码放在名为connect.php的连接文件中,该文件包含在需要访问数据库的所有php脚本中.
如果黑客获得了connect.php(http://www.domainname.com/connect.php)的网址,是否有可能破解我的数据库.如何确保php连接代码无法帮助黑客?或者哪种连接数据库最安全?