By mklynx on
Hi all
I have created a small module and i wrote everything in my module file.
But i want to write more and it is becoming very untidy. So i put most of my code in a second file and included this file into the .info file like this
files[] = filename
But now it can not find the functions any more. I have deleted it all and reinstalled it but it still is not picking them up. ( error Call to undefined function )
Any suggestions.
Marcel
Comments
Use module_load_include()
You should use module_load_include() instead. Place the function in the hook_init() function and you should be god to go. Read a longer answer here http://drupal.stackexchange.com/questions/861/are-files-from-custom-modu...
/Johan
module_load_include
Hi
You mean like this
Still getting the same error.
Marcel
file.inc
Hi found the problem
I was putting file.inc in there and i should have dropped the inc.
Marcel