Welcome Guest, Not a member yet? Register   Sign In
site_url & base_url performance
#4

That is why I prefer to use a constant.

constants.php
PHP Code:
define('BASE_URL''http://yourdomain.com/codeigniter/'); 


and

config.php
PHP Code:
$config['base_url'] = BASE_URL

In the views:
Code:
<a href="<?php echo BASE_URL."controller/method" ?> >Action</a>

Reply


Messages In This Thread
site_url & base_url performance - by puschie - 06-11-2018, 11:57 PM
RE: site_url & base_url performance - by InsiteFX - 06-12-2018, 03:23 AM
RE: site_url & base_url performance - by puschie - 06-12-2018, 04:59 AM
RE: site_url &amp; base_url performance - by davicotico - 06-12-2018, 06:19 AM
RE: site_url & base_url performance - by kilishan - 06-12-2018, 06:22 AM
RE: site_url & base_url performance - by puschie - 06-13-2018, 04:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB