i am making my own framework and would like to allow easy direct access to a asset file such an image, a javascript or a css file.
currently I’m attempting to allow the use of
<link rel="stylesheet" href="/assets/css/style.css" />
I have my .htaccess file capture the URI and allow me to manipulate it with PHP.
My router class captures the uri and detects the actual path to the file. So my question is how do i write it up in PHP?
public function router($file)
{
//output assets file here
}
1 Answer