Aventro Posted February 9, 2013 Share Posted February 9, 2013 You don't have to worry about closing the link as it per automatic will close the connection on the end of the page. Quote Link to comment Share on other sites More sharing options...
newttster Posted February 9, 2013 Author Share Posted February 9, 2013 Sweet. As to opening the $link ... can it be done the way I asked about previously? Quote Link to comment Share on other sites More sharing options...
Aventro Posted February 9, 2013 Share Posted February 9, 2013 Sweet. As to opening the $link ... can it be done the way I asked about previously? Sorry, I don't know how McCodes works, as I've never looked at its source code. However, yes, you can place the database connection in the config.php file and if including that file, you will have access to the connection. However, I wouldn't recommend using globals, it's considered bad practise, essentially in large projects, like a web based game can be. This among other reasons is why you should use a proper framework to avoid architecture problems, I seriously consider making an engine based upon a framework. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.