Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:12:30+00:00 2026-06-15T14:12:30+00:00

I might be a bit confused and may need your help with this. I’m

  • 0

I might be a bit confused and may need your help with this.
I’m inside inc/newsletter.php and want to include a library that is inside lib/mailchimp-api-class

How do I refer to this class file?

I thought it should be …

require_once '../lib/mailchimp-api-class/MCAPI.class.php';

enter image description here

However, this doesn’t work … 

Warning: require_once(../lib/mailchimp-api-class/MCAPI.class.php) [function.require-
once]: failed to open stream: No such file or directory in /Users/myname/htdocs/wr/
wp-content/themes/mytheme/inc/newsletter.php on line 6
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:12:32+00:00Added an answer on June 15, 2026 at 2:12 pm

    I think you’re using WordPress. This is not working because the relative path is from the starting file.

    Try:

    require_once dirname(__FILE__).'/../lib/mailchimp-api-class/MCAPI.class.php';
    

    In PHP 5.3 or newer:

    you can use __DIR__ instead of dirname(__FILE__)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a very basic question, but I am a bit confused about
This might be a very basic question, but I'm getting a bit confused. I'm
This might be quite simple, but I must say I'm a bit confused on
This might sound a bit of an odd question but I know what I
This might seem a bit weird, but since I am new in RoR and
My theory might be a bit weak asking this, so feel free to let
Ok this might be a bit of hack but bear with me :) The
I know this might be a bit awkward but I am trying to modify
I might be being a bit thicky here but please answer me this. Consider
I am a bit confused about where to describe the algorithm I might use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.