Can anyone explain why this isnt working?
I have two files index.php and include.php, the code for both are below, index includes the include.php but it doesnt output anything.
Include.php
<?php
class test {
var $two;
$this->two = 'variable 2';
function test1() {
$one = 'variable 1';
$testvar1 = $this->two;
$testvar1 .= $one;
return $testvar1;
}
function test2() {
global $three;
$three = 'variable three';
}
}
$test = new test;
?>
Index.php
<?php
include 'include.php';
$mine = $test->test1();
echo $mine;
$test->test2();
echo $three
echo "<html>me test</html>";
?>