Jump to content

Recommended Posts

Posted

Hello,

I want to access the $config variable outside the template  directory.

so I tried 

$config = wire('config');

...but got this error:

" PHP Fatal error:  Uncaught Error: Call to undefined function wire() "

What do I have to do?

 

 

Posted
51 minutes ago, abdus said:

Call it like \ProcessWire\wire()->config

Or add <?php namespace ProcessWire; at the top of your file.

Unfortunately this does not work.

In both cases I get the error:

" Uncaught Error: Call to undefined function ProcessWire\\wire() in...."

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...