【发布时间】:2017-02-24 03:53:59
【问题描述】:
使用base_url() 编写的所有内容都不会加载到 Codeigniter 中。
<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/';
【问题讨论】:
-
你的
base_url是什么? -
你know怎么用
base_url() -
当然,我愿意。请参阅上面的示例。
-
确保你的css和东西在根目录和你的基本url应该是
$config['base_url'] = 'http://localhost/projectname/';而不是$config['base_url'] = 'http://localhost/';在application/config/config,php上
标签: php html css codeigniter