I am getting an
unexpected end of file error on my CodeIgniter View.
I have pasted the PHP code at http://codepad.org/S12oXE4t.
This code passed various online PHP syntax tests, but I don't know why still it shows me the below error while I was trying to run in WAMP Server.
Parse error: syntax error, unexpected end of file in E:\wampserver\www\CodeIgniter\application\views\layouts\default.php on line 676
line 676 is the last line in the code. What did I do wrong?
This question is tagged with
~ Asked on 2012-12-21 12:59:12
Check your short_open_tag setting (use
<?php phpinfo() ?> to see its current setting).
~ Answered on 2012-12-21 13:22:57
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
Please at least attempt the following things:
;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).
~ Answered on 2012-12-21 13:00:34