Welcome Guest, Not a member yet? Register   Sign In
APPPATH changed
#1

(This post was last modified: 04-16-2015, 02:56 AM by khashabawy.)

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 :

Code:
http://localhost/project/application/views/default/assets/css/main.css


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(){

        if([email protected]defined("APPFOLDER")){ 
            @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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB