For some reason, when I run this code, when adding an ID (the second block), my template doesn't seem to find my CSS/image files anymore.
But the code is exactly the same (apart from using an @id to request the parameter). Code framework that's been used is Fat-free framework.
This is my code:
$f3->route('GET /detail',
function($f3, $params) {
$test = new renderEngine;
$test->detail($f3, $params['id']);
}
);
$f3->route('GET /detail/@id',
function($f3, $params) {
$test = new renderEngine;
$test->detail($f3, $params['id']);
}
);
When checking in Chrome developer (or however you call the window) in the Sources tab I can see that in the first case it's:
>localhost
>
>--Audiodelight (name of my rootfolder)
>
>----css (with in that map my css files)
In the second case I get
>localhost
>
>--Audiodelight/detail (Which seems to be the problem)
>
>----css (with in that map my css files)
Does anyone have an idea why it's searching in a subdirectory? The directory it's looking for doesn't even exist.. Or know how to fix it?