Forum Moderators: coopster
So a site grabs the connection file from the other site and uses that to access the db. (there is more in that file also that makes an include useful otherwise I wouldn't bother).
However, it is not working and I am wondering if I can include a php file containing variables to connect to the db from a remote site?
I can get some text echoed so I know it's reading the file but it doesnt seem to be working and I have the file within <? ?> so it is being parsed.
Any ideas? thanks in advance.
you should _never_ do that. don't expose database information on a public webserver. never ever. anyone could, with a little luck, guess the filename and get your login credentials.
Exactly how does your include-code look?
How does the included file look?
Is the included file a .php, so it will be interpreted on the server it's living on?