Welcome Guest, Not a member yet? Register   Sign In
How to 'serve' file from the 'public' folder!?
#1

(This post was last modified: 09-23-2020, 04:07 AM by blaasvaer.)

Bam! Baffled again.

OK, I'm 'trying' to implement some sort of themes control and get kicked in the balls ...

I have this (excerpt):

Code:
if ( $indexphp ) {
    $this->_render_page( array(
        ROOTPATH . 'public/themes/' . $this->active_theme . '/' . $page,
    ), $this->data );
} else {
    $this->_render_page( array(
        ROOTPATH . 'public/themes/' . $this->default_theme . '/index.php'));
}

HOW do I serve an index.php file from the 'public' folder!? The file IS THERE, but I get a:

Code:
CodeIgniter\View\Exceptions\ViewException

Error. What am I doing wrong (again, again)?

I get that a Controller somehow 'automatically' points to 'Views' directory, but HOW do I change that to the 'public' folder for doing something like this? Or maybe I'm – once more – NOT getting how to 'use' CI 4 properly.
Reply


Messages In This Thread
How to 'serve' file from the 'public' folder!? - by blaasvaer - 09-23-2020, 04:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB