(Yes this has to do with what I'm doing with AG/LG)
So what is a good practice for storing the connection to the database file? How are websites typically set up?So lets say I have a site called livegrenade.com ( :3 )would it work like this on the server?/public_html/livegrenade/index.phpand the connection:/public_html/config.php(the config would of course check to make sure it is included and not just linked)Then call using, for example, ../config.phplet me know guise.
You should be able to reference it with ../config.php, yes.
Yeah, it seems like this is a good option so I can set FTP permissions to the site directory so they cant see the passwords if I don't want them to right?
To hide them from other site developers or something? Or do you have public FTP on for the whole site?
Let me try it. h/o a sec
EDIT: Yeah it looks like the user can only access that directory. That will work :DIf they can run PHP, they can still get to your passwords.
EDIT: nvm, that was completely off-topic and I should just go to bed now.You can also just use one of the many PHP frameworks out there to ensure maintainability and make everything easier, basically.Well you have a point there but Im not sure that the site could afford that at this stage.
Everything works, but i started coding it since I began PHP, so it will need to be redone at some point. (its not written with OOP)Use MVP/OOP. Best option.
Put your config.php file in a subdirectory, and use a .htaccess file to block off outside access.