CodeIgniter Forums
The welcome.php missing ?> - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: The welcome.php missing ?> (/showthread.php?tid=16953)



The welcome.php missing ?> - El Forum - 03-21-2009

[eluser]hasokeric[/eluser]
The welcome.php Controller has a missing ?>
i am not sure if its needed or not -- but reading the Documentation about Controllers i see it being used -- however this confused me alot... so whats the deal is this a bug or not needed


welcome.php (latest version)

Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();    
    }
    
    function index()
    {
        $this->load->view('welcome_message');
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */



The welcome.php missing ?> - El Forum - 03-21-2009

[eluser]pistolPete[/eluser]
User guide:
Quote:PHP Closing Tag
The PHP closing tag on a PHP document ?> is optional to the PHP parser. (...) all PHP files should OMIT the closing PHP tag

But the documentation is inconsistent, the closing tag should be removed from e.g. Controllers.