Importing core into another script
-
I’m trying to import the WP core into another script but I think that there is a $GLOBALS database conflict or something because WP works fine on it’s own but any time I try to import WP into the other script using:
require_once(BX_DIRECTORY_PATH_ROOT . 'wordpress/wp-config.php'); $wp->init(); $wp->parse_request(); $wp->query_posts(); $wp->register_globals(); $wp->send_headers();
It always produces this error:
mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/slickone/public_html/dev/int/wordpress/wp-includes/wp-db.php on line 1122
I also tried adding the “new_link” parameter to the mysql_connect functions and still the same things.
I had it working when both scripts were running on the same database, but I needed to separate them and now nothing will work. Is there something I can add or change to the wpdb class to get this thing running properly?
- The topic ‘Importing core into another script’ is closed to new replies.