Welcome Guest, Not a member yet? Register   Sign In
using APPPATH
#2

(This post was last modified: 07-04-2023, 09:03 AM by luckmoshy.)

There are at least 4 Global directories in CI4  which are WRITEPATH,FILEPATH,ROOTPATH and APPPATH so for you to get your assets you shoul use ROOTPATH  https://codeigniter.com/user_guide/gener...l#ROOTPATH

APPPATH indicates inside APP and ROOTPATH The path to the project root directory


also, these files can be registered to autoload if you like

PHP Code:
<?php

namespace Config;

use 
CodeIgniter\Config\AutoloadConfig;

class 
Autoload extends AutoloadConfig
{
    // ...
    public $classmap = [
        
///inside APP
        'Markdown' => APPPATH 'ThirdParty/markdown.php',
    
//in the root directory    app,Myfiles
       
'Markdown' => ROOTPATH 'Myfiles/MyExecutive_summary.php.php',
    ];

    // ... 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply


Messages In This Thread
using APPPATH - by richb201 - 07-04-2023, 08:15 AM
RE: using APPPATH - by luckmoshy - 07-04-2023, 08:51 AM
RE: using APPPATH - by richb201 - 07-04-2023, 11:45 AM
RE: using APPPATH - by kenjis - 07-04-2023, 05:37 PM
RE: using APPPATH - by kenjis - 07-04-2023, 05:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB