Welcome Guest, Not a member yet? Register   Sign In
Base_url as a default value in a custom Config file
#1

PHP Code:
namespace App\Config;

use 
CodeIgniter\Config\BaseConfig;

class 
MyConfig extends BaseConfig
{
    public $myTargetLink  base_url() . '/path/to/link';



Hello.

I am wondering how I can access the base_url in a Config file.

Doing this give me an error "Constant expression contains invalid operations"

Is getting the base_url() possible as a default value in a Config file?

Thanks for your time.

Max
Reply


Messages In This Thread
Base_url as a default value in a custom Config file - by sevmusic - 10-15-2021, 10:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB