base_url() 在 CSS 文件中不起作用...
这是我的 php :
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/style.css"/>
<body>
</body>
Run Code Online (Sandbox Code Playgroud)
这是我的 css/style.css :
body {
background:#356aa0 url(<?=base_url()?>img/background.png) repeat-x;
color:#fff;
}
Run Code Online (Sandbox Code Playgroud)
文本颜色变为白色,但图像不显示...如果我使用 url(../img/background.png),它会显示...但是当我打开 url localhost/project/index. php/control/function/var1/var2,它没有出现...
已解决,谢谢大家... :]
我在这样的视图文件夹中创建 php 文件:
<?php header("content-type: text/css"); ?>
body {
background:url(<?=base_url()?>img/background.png);
}
Run Code Online (Sandbox Code Playgroud)
然后我加载我刚刚在控制器上使用函数创建的 php 文件,然后我将它链接起来:
<link type="text/css" rel="stylesheet" href="<?=base_url()?>control/style.php"/>
Run Code Online (Sandbox Code Playgroud)
它的工作,谢谢大家...
我的读者:
var reader = new Ext.data.JsonReader({
totalProperty: 'total',
successProperty: 'success',
idProperty: 'id_k',
root: 'rows',
messageProperty: 'message' // <-- New "messageProperty" meta-data }, [
{name: 'id_k'}, {name: 'nm_kb', allowBlank: false},
{name: 'id_p'}, {name: 'nm_p', allowBlank: false} ]);
Run Code Online (Sandbox Code Playgroud)
我的专栏:
{header: "Provinsi", width: 100, sortable: true, dataIndex: 'id_p'}
我如何使dataIndex:'id_p'显示为'nm_p'但仍然是dataIndex:'id_p'?
我希望它显示'nm_p'....
谢谢...