【问题标题】:How to load bootstrap on mbile using hmvc codeigniter?如何使用 hmvc codeigniter 在移动设备上加载引导程序?
【发布时间】:2019-10-17 16:08:30
【问题描述】:

我正在制作一个桌面应用程序,用于使用 PHP codeigniter(HMVC) 引导程序等来保存记录,我正在使用 xampp 在本地托管它,每当我使用我的电脑的 IP 地址从我的手机打开应用程序时,页面都会以纯 html 呈现在代码中使用了引导程序,它在我的计算机上运行良好,但是导航栏等引导程序组件以纯 html 呈现。我使用的是 hmvc,因此我为页面布局创建了一个单独的文件夹。

我正在使用最新版本的 bootstrap,codeigniter(HMVC)

【问题讨论】:

    标签: php mobile bootstrap-4 codeigniter-3 hmvc


    【解决方案1】:

    我知道这里有什么问题,您正在使用资产的相对路径,您不应该这样做..您需要使用完整的 uri,因为从另一个 IP 地址访问它会看到 localhost 并将其解决为自己的localhost,希望你明白了,你需要做的是:

    <link href="<?= site_url('path_to_bootstrap_css_relative_to_your_fcpath') ?>" rel="stylesheet" type="text/css">
    

    并确保将您的site_url 设置为您的config.php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-01
      • 2019-04-21
      • 2021-04-13
      • 2017-01-29
      • 1970-01-01
      • 2019-12-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多