Okay. I have a file called global_functions.php, where I define the main functions used on the site. This works fine. In one of these functions, there is a call for "include('admin_modules.php');" which also works fine. In the admin_modules.php-file, there is a call to a function, publish_info(); <- this one does NOT work when the function is declared in the admin_modules.php-file. If I move the publish_info() function to the global_functions.php, it works just fine. While it's located in the admin_modules.php-file, I get a "call to undefined function". Anyone know why this happens? Shouldn't a function declared in the end of a file work just fine? And the function itself isn't very complicated - right now it's just an echo-statement, for testing purposes. Nevermind! I found the problem, and as usual it was plain and simple user-error. There was an include-file present that overwrote a value, thus making the function invalid. Fixed now
Are you positive that the file is being included properly? If you haven't tried it, I would use require, and see if an error is thrown.
The file itself was included properly - the file contained other info that showed up when I removed the function. So that wasn't the problem. To me, it seemed the problem was an object-call in the original function, which used a $user-variable, which got overwritten because of another include in the parent function. Removed the include from the parent function, and everything works as it's supposed to do