CodeIgniter Forums
APPPATH changed - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: APPPATH changed (/showthread.php?tid=61445)

APPPATH changed - khashabawy - 04-16-2015

Hello there ,

I used to use the APPPATH variable to point to my application folder 

PHP Code:
<?php echo base_url(APPPATH."views/".style."/assets/css/main.css"); ?>

outputting :


as it was outputting just the name of the application folder not the full path

Now in CI 3 APPPATH is getting the full path of the Application folder 

i have to define a new constant for showing the APPFOLDER

PHP Code:
    $hook['pre_system'] = function(){

            @define("APPFOLDER"ltrim(str_replace('\\''/'str_replace(trim(FCPATH,"/"),"",APPPATH) ) , "/" ) ); 

I recommend you make it available and predefined 

and add this change to the : 2.x to 3.x guide

thanks for your efforts