I'm getting error:
Fatal error: Method name must be a string in C:\xampp\htdocs\index.php on line 15"
LINE 15:
$obj = new $url[0]();
CODE:
<?php
error_reporting(E_ALL ^ E_NOTICE);
$url = $_GET['url'];
$url = explode('/', $url);
if (!file_exists('controllers/' . $url[0] . '.php')) {
$url[0] = 'error'; // error kontroleris
}
require 'controllers/' . $url[0] . '.php';
$obj = new $url[0]();
$obj->$url[1]();
BTW.: Script is not finished yet.