doukanwa6872 2014-04-30 16:31
浏览 33
已采纳

没有错误只显示白色屏幕

I'm trying to work locally on my mac with the Mamp software and have a fresh install of Codeigniter set up in a subdirectory of my sites folder and when I try and load my Home controller I'm not getting any errors or have anything being displayed on the screen and I'm trying to find out why that could be.

- Documents
    -Sites
        -mysite
            -application
                -controllers
                    home.php

I'm started the apache and mysql servers and went to http://localhost/mysite/ . The default controller that I have set up in the routes is home and I'm getting a white screen. This is the following code I have inside the home controller.

<?php

class Home extends CI_Controller {
    public function __construct() {
        parent::__construct();
    }

    public function index() {
        public $data = array();
        echo 'this is the index function';
        //$this->load->view('homepage', $data, TRUE);
    }
}
  • 写回答

4条回答 默认 最新

  • dpwjx32578146 2014-05-01 10:24
    关注

    If you don't load a helper/controller/library but you use some of the functions in it, you will get a white screen too.

    That is the first thing I check when I get white screens.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?