The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Accessing DB in another script
I know little about writing VB scrips / mods, but I am trying to use the VB config.php to access the DB from another part of my site.
With the DB settings set to this in config.php... PHP Code:
Let's say the config.sys file is in: Code:
http://www.mysite.com/forum/includes/ |
#2
|
|||
|
|||
It depends on where you place your script.
If your script is in the root and your forum is located in /forum/ then you can connect doing something like: PHP Code:
|
Благодарность от: | ||
gambler726 |
#3
|
||||
|
||||
Quote:
Quote:
|
#4
|
||||
|
||||
Based on what you want to do, you don't need to manually connect to the database but simply call the vB API externally from a different site that's on the same server.
Take a look at this blog on how to login to vB from an external site. http://www.vbulletin.com/forum/blogs...n-your-website It calls the user API to login and did not have to manually connect to vB database. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|