We can add css, js, images files in the codeignitor by following code!
<link href="<?php echo base_url();?>assets/css/sheet.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="<?php echo base_url();?>assets/js/script.js"></script>
set $config variable in config.php like this:
$config['base_url'] = str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
No comments:
Post a Comment