相关疑难解决方法(0)

base_url()函数在codeigniter中不起作用

我正在使用codeigniter开发我们的应用程序.我试图使用base_url()函数,但它显示空结果.我通过自动加载文件使用了autoload helper,但是它似乎也没有用.我也定义了基本常量,但都是徒劳的.请帮忙.

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo $title; ?></title>        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="stylesheet" href="<?php echo base_url();?>/css/template/default.css" type="text/css" />
        <script type="text/javascript">
            //<![CDATA[
            base_url = '<?= base_url();?>';
            //]]>
        </script>
    </head>
Run Code Online (Sandbox Code Playgroud)

php codeigniter

63
推荐指数
2
解决办法
30万
查看次数

site_url()在codeigniter框架中无法正常工作

以下工作对于codeigniter框架不能正常工作......

它是我的观点:

<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text']."</br></br>";
?>
<a href="<?php site_url("news"); ?>" > Back to Main </a></br></br>
Run Code Online (Sandbox Code Playgroud)

codeigniter codeigniter-url

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

codeigniter ×2

codeigniter-url ×1

php ×1