Here's an example of what I have going on:
common.php
<?php
class Common {
function test() {
echo 'asdf;
}
}?>
webpage.php
<?php
require_once("common.php");
?>
<html>
<body>
<?php test(); ?>
</body>
</html>
No matter what I've tried, I cannot get the function test to print any text to the page. With the actual webpage I was using, anything below the '' line didn't load with that portion included. I've been searching around for the past hour to figure this out, what am I doing wrong?
$foo = new Common; $foo->test()is what you're missing. And since you don't mention getting a "fatal error: call to undefined function" error, you're undoubtedly working with error_reporting and display_errors turned off. they should NEVER be off on a devel/debug system.