Jump to content

Including a class in Hanna code


Recommended Posts

I'm trying to load a class (it's going to load mls data from another db) in my hanna. The only way I could get the class to load was by placing it in the /cache/HannaCode folder other wise my include would fail. Is this where it needs to live to be accessed?

Link to comment
Share on other sites

I would avoid putting it in /cache/HannaCode/. What does your include line look like? If your class file were placed in /site/templates/includes/ (for example) then your include line should look like this:

require_once(wire('config')->paths->templates . "includes/YourClass.php");  
  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...