WordPress.org

Ready to get started?Download WordPress

Forums

add a new wpdb class (4 posts)

  1. larzo92
    Member
    Posted 5 months ago #

    hi, I want to add a new class wpdb $wpdb1 = new wpdb(my_db_login, my_db_password, my_DB_NAME,my_DB_HOST); for my wordpress blog but I don't know how.
    when I put it the following class in wp-config i got this error message
    Fatal error: Class 'wpdb' not found in line 80

  2. bcworkz
    Member
    Posted 5 months ago #

    The file containing the class declaration is loaded after wp-config.php. Your code needs to be executed after WP finishes loading. Other than bad timing, you have the right idea.

  3. larzo92
    Member
    Posted 5 months ago #

    ça veut dire in wp-config ? :s

  4. bcworkz
    Member
    Posted 5 months ago #

    Huh? Anglais s'il vous plaît.

Reply

You must log in to post.

About this Topic

Tags