Code: Select all
$mysqli = new mysqli("localhost", "db_user", "db_password", "db_name");What is the right/best approach?
file_get_contents()
require_once()
include_once()
Something else?
Moderator: General Moderators
Code: Select all
$mysqli = new mysqli("localhost", "db_user", "db_password", "db_name");That's what I did wrong. I assumed since it was being pulled into a file that already had the opening and closing php tags, it wasn't needed. Bad assumptioncalifdon wrote:Be sure that the other file has <?php and ?> tags in it.