php webserver equivalent of mongrel?
Is there a php equivalent of mongrel? I don't want to install Apache, just to preview a simple template开发者_开发百科.
mongrel2 looks promising!
This is possible starting with php 5.4: http://php.net/manual/en/features.commandline.webserver.php
As of PHP 5.4.0, the CLI SAPI provides a built-in web server.
This web server is designed for developmental purposes only, and should not be used in production.
To run it:
$ cd ~/public_html
$ php -S localhost:8000
I know it's not the ideal solution, but if it's just one page, you can render it straight out to HTML.
php /path/to/file.php > /path/to/output.html
As I posted in the other thread - have a look at Photon (http://www.photon-project.com), it might serve your needs quite well already.
精彩评论