As I see, you are trying to include a function inside a class declaration. It could be done using usual inheritence using the "implements" keyword... But if we stick to your case, I'd suggest you put the code of the function in the included file, instead of the function declaration, that way you can declare it the way you want in different files like so:
File func.php
<?php
echo "HELLO WORLD";
?>
File inc.php
<?php
class _includes_ {
function inc_test(){
include_once("func.php");
}
}
?>
File test.php
<?php
include"inc.php";
$inc = new _includes_();
$inc->inc_test();
# after this line, the function won't work as it has not been defined...
# any more if i use it ....
test(); // like here ...
function test(){
include("func.php");
}
//Now that I declared the function test(), I can use it...
test();
?>
Pay close attention to include and include_once though... include_once means the file can only be included one time per execution, that is why I used include instead of include_once in the above example.