Unexpected end of file
means that something else was expected before the PHP parser reached the end of the script.
Judging from your HUGE file, it's probably that you're missing a closing brace (}
) from an if
statement.
Please at least attempt the following things:
- Separate your code from your view logic.
- Be consistent, you're using an end
;
in some of your embedded PHP statements, and not in others, ie. <?php echo base_url(); ?>
vs <?php echo $this->layouts->print_includes() ?>
. It's not required, so don't use it (or do, just do one or the other).
- Repeated because it's important, separate your concerns. There's no need for all of this code.
- Use an IDE, it will help you with errors such as this going forward.