PHPDaemon\SockJS\Methods\Htmlfile::init PHP Method

init() public method

Constructor
public init ( ) : void
return void
    public function init()
    {
        parent::init();
        if ($this->isFinished()) {
            return;
        }
        echo str_repeat(' ', 1024);
        echo "\n\n";
        ?>
        <!DOCTYPE html>
        <html>
        <head>
            <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        </head>
        <body>
        <h2>Don't panic!</h2>
        <script>
            document.domain = document.domain;
            var c = parent.<?php 
        echo $_GET['c'];
        ?>
;
            c.start();
            function p(d) {
                c.message(d);
            }
            ;
            window.onload = function () {
                c.stop();
            };
        </script>
        </body>
        </html>
        <?php 
    }