1

i am using Laravel 4 my base url is http://localhost/messifan/fms/laravel/public/

my css in public/css/barcelona.css

browser trying to load this URL

http://localhost/messifan/fms/laravel/public/css/barcelona.css 

i am using this code in view to load css

<?php echo URL::asset('css/barcelona.css'); ?> 

I get this error trying to open http://localhost/messifan/fms/laravel/public/css/barcelona.css

enter image description here

2

2 Answers 2

2

The problem could be on your htaccess or permissions.

Try to temporarily remove htaccess and try to access directly the css file. If the problem persists then you should try to chmod public/css folder and the files in to 777 and try again.

Check again the path to the css file and its name.

Sign up to request clarification or add additional context in comments.

Comments

1

Try

<?php echo HTML::style('css/barcelona.css'); ?> 

Edit PS: This will load the styles. To access the path to the file, you don't need to do much! well, unless you want to put the link to it in your view:

<a href="<?php echo URL::asset('css/barcelona.css'); ?>">The CSS File</a> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.