C'est La Vie

    人生无彩排,每一天都是现场直播!

    Node.php

    Evented I/O for PHP [ GitHub ] Example HTTP server list […]

    Evented I/O for PHP [ GitHub ]

    Example HTTP server

    listen(8080, function($request, $response) {
        $response->end("yay, super awesome response");
    });
    nodephp_run();
    ?>

    To build:

    First build nodephp as a php module

    make
    sudo make install

    Then you must add the following line to your php.ini

    extension = nodephp.so

    Now you can go and run the example script

    php src/test.php

    Now if you point your browser to 127.0.0.1:8080 you should see the response being served by the test script via nodephp

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用*标注