Welcome Guest, Not a member yet? Register   Sign In
2 Baseurl
#3

(This post was last modified: 08-23-2020, 01:44 AM by pippuccio76.)

(08-22-2020, 12:00 AM)jreklund Wrote: Yes, as CodeIgniter are just plain PHP you can access it everywhere. Just modify your /app/Config/App.php and you are gold. Depending on where that setting comes from, you may need to validate it first.

But it's a variable in a class , i cannot use if statement :


Code:
    if ($_SERVER['SERVER_NAME']== 'http://localhost:8080/') {
        public $baseURL = 'http://localhost:8080/';

    }else{
        
        public $baseURL = 'https://mywebsite.com/';
    }
Reply


Messages In This Thread
2 Baseurl - by pippuccio76 - 08-20-2020, 03:01 AM
RE: 2 Baseurl - by jreklund - 08-22-2020, 12:00 AM
RE: 2 Baseurl - by pippuccio76 - 08-23-2020, 01:43 AM
RE: 2 Baseurl - by jreklund - 08-23-2020, 01:53 AM
RE: 2 Baseurl - by pippuccio76 - 08-23-2020, 06:27 AM
RE: 2 Baseurl - by jreklund - 08-23-2020, 06:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB