Strange issue with loading libraries

Permalink
I am trying to load a library file that is a simple php file, no classes or functions. I load it the usual way, loader::library('path/to/file');
but variables that are set in the file that loads the library aren't available in the library file.
Does anyone know how to fix this?

12345j
 
andrew replied on at Permalink Best Answer Reply
andrew
Unlike the php include() statement, loader::library() is a function. As such variables you define before it don't automatically go into it. With elements and things we provide an array that you can pass named parameters through but we don't do this with libraries because typically they're self-contained classes.