Welcome Guest, Not a member yet? Register   Sign In
Help regarding the path variable
#1

[eluser]oldrock[/eluser]
hi ,

could anybody please let me know is there any variable availble for getting the path for current page.

The purpose is to link to the css file on all the pages of my website


thamks n advance
#2

[eluser]WanWizard[/eluser]
Have you checked the URI class (see the user guide )?

You shouldn't make a css file (or any asset) dependent on the page URI. It is best practice to have all assets in a folder called 'assets' in the root of your website (and then sub folders per type).
Assets are then references using
Code:
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/mycssfile.css" type="text/css" media="screen"/>

Don't forget to configure your base_url and index file in config/config.php.




Theme © iAndrew 2016 - Forum software by © MyBB