[eluser]Unknown[/eluser]
Hi everyone,
Here's what my controller looks like:
Code:
<?php
class Site extends CI_Controller {
var $file;
var $path;
function Site() {
parent::__construct();
$this->load->helper('file');
$this->load->helper('directory');
$this->load->helper('url');
$this->load->helper('download');
$this->file = "application/files_saved/hello.txt";
$this->path = "application/files_saved";
}
function display() {
$this->load->view('files');
}
}
and in my view I just have this:
Code:
<div id="files">
<?php print_r($file); ?>
</div>
Now when I go to /site/display I get an undefined variable: 'file' error. Any ideas?