Wordpress : is it possible to connect $wpdb class into other database?
-
23-09-2019 - |
문제
the question is related to wordpress coding only. If it possible, the code solution is able to use inside a wordpress blog.
$wpdb is only work with database that been declare in wp-config. So it possible to clone $wpdb then use the clone to access different database?
해결책
You can just create a new instance:
$db2 = new wpdb('root','root','test','localhost');
제휴하지 않습니다 StackOverflow