我正在将一些查询转换为准备好的语句,我目前在连接文件中有以下内容:
<?php
DEFINE ('DB_USER' , 'blah');
DEFINE ('DB_PASSWORD' , 'blah');
DEFINE ('DB_HOST' , 'localhost');
DEFINE ('DB_NAME' , 'blah');
//make the connection
$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
OR die ('Could not connect to MySQL: ' .
mysqli_connect_error() );
?>
我还能以某种方式使用 $dbc 吗?我不想将我的连接信息明文写成这样的语句:
$mysqli = new mysqli("heres", "all", "my", "sensitive", "information"):
提前致谢!