2017-02-21 77 views
0

在Codeigniter中未加载用base_url()加载的所有内容。未在Codeigniter中加载CSS和图片

<link href="<?php echo base_url(); ?>other/css/admin/style.css" rel="stylesheet" type="text/css"> 
<img class="brand" src="<?php echo base_url(); ?>other/img/logo.png"> 

中有:

WAMP - > WWW - >其他 - > CSS/IMG

我BASE_URL是:

$base_url = 'http://localhost/'; 
+0

你是什么'base_url'? –

+0

你知道吗(http://stackoverflow.com/a/6449396/3898339)如何使用'base_url()' –

+0

当然,我这样做。看到上面的例子。 – prezli

回答

0

改变自己的基本网址到这一点:

$base_url = 'http://localhost/PROJECTNAME/'; 

这里的 “PROJECTNAME” 是你的项目目录。

0

更改BASE_URL变量是这样的:

$base_url = 'http://localhost/other/'; 

,其中 “其他” 是该项目的文件夹

0

更改基本URL这样的:

$base_url = '/';