でconfig.phpでCodeIgniter 2でベースURLを取得する方法*
$config['base_url'] = 'http://localhost/codeigniter/';
で表示
<link rel="stylesheet" href="<?php base_url(); ?>css/default.css" type="text/css" />
=> Error: Call to undefined function base_url();
ヘルプ
私のコントローラで$ this-> config-> base_url( "localhost/mysite");を使用している場合、echo href = "<?php echo base_url();?>これを試してみてください。 – pratik