Jump to content

Including my connect.php prints its contents rather than running them.


Fenlig

Recommended Posts

Hey guys, So here is my scripts: test.php

<?phpinclude 'connect.php';?>

connect.php

define("HOST", "localhost");define("USER", "guest");define("PASSWORD", "guest");define("DATABASE", "Minecraft");$mysqli = new mysqli (HOST, USER, PASSWORD, DATABASE);

But when I go and view the test.php in my browser it just prints all the code on the screen like this

define("HOST", "localhost"); define("USER", "guest"); define("PASSWORD", "guest"); define("DATABASE", "Minecraft"); $mysqli = new mysqli (HOST, USER, PASSWORD, DATABASE);

Im a newb to PHP can anyone see what I have done wrong?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...