我在我的header.php上有這個鏈接我在這裏在stackoverflow中跟着所有正確的答案,仍然沒有爲我工作。任何人都可以幫助請求。三江源提前:)css文件不能在codeigniter中加載?
我的文件夾結構是:
主文件夾: ci_attl - 應用 - CSS - style.css的
<link href="<?php echo base_url();?>application/css/style.css" rel="stylesheet"> - not working
<link href="<?php echo base_url();?>/css/style.css" rel="stylesheet"> - not working
<link href="<?php echo base_url();?>../css/style.css" rel="stylesheet"> - not working
我autoload.php
$autoload['helper'] = array('form','url', 'html');
我的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ci_attl/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
我的config.php
$config['base_url'] = '';
$config['index_page'] = '';
我的控制檯錯誤
Failed to load resource: the server responded with a status of 403 (Forbidden)
http://[::1]/ci_attl/application/css/style.css
任何人都可以幫我嗎?謝謝 –