I am trying to make an interactive php website using MVC framework and on a MAMP server, I am at the first steps of this. I am using the following code to access a different page which has a __construct() function to echo some text... but the index.php returns a blank page...
init.php:
<?php
require_once 'core/App.php';
?>
the other page code is:
App.php:
<?php
class App {
public function __construct() {
echo 'some text';
}
}
my index.php is as follows:
<?php
require_once '../app/init.php';
$app = new App;
?>
and I looked at the different solutions and have tried many but still not working. like adding ROOT or DIR and even FILE, knowing that my version of PHP is 7.
help is appreciated... thank you...