base_url and port number |
how can i construct the following URL for my site?
http://127.0.0.1:8080/appname/ calls to base_url() return this http://127.0.0.1/appname/ (06-09-2016, 01:14 PM)usr_ny Wrote: how can i construct the following URL for my site? Set in application/config/config.php: PHP Code: $config['base_url'] = 'http://127.0.0.1:8080/appname/';
But the problem is, that I'm deploying to a server and I don't know what the server address or base URL will be.
The address can automatically change from http://127.0.0.1:8080/appname/ to http://127.0.0.2:8081/appname/ So, I can't hard code the: PHP Code: $config['base_url'] = 'http://127.0.0.1:8080/appname/'; Can CI determine the base URL without me setting that config value?
This code is from CI manual, with some changes
PHP Code: // change your domain below |
Welcome Guest, Not a member yet? Register Sign In |