开发者

Are there any php frameworks contain small webserver and rich console tools like RoR/Django?

开发者 https://www.devze.com 2023-01-07 07:41 出处:网络
In Ruby on Rails, I can start my web appl开发者_开发百科ication, just write in console: script/server.

In Ruby on Rails, I can start my web appl开发者_开发百科ication, just write in console: script/server. RoR contains small webserver and rich console tools, but I didn`t meet such tools in php frameworks. Are there any php frameworks contain small webserver and rich console tools?


Neither PHP, nor any of the PHP frameworks bring their own webserver. Some frameworks offer rake like tools like Cake's bake or ZF's Zend_Tool. There is also Phing and Pake that are not specific to a framework. The closest to Gem in PHP is PEAR. You can start PHP in interactive mode from the shell with php -a

As of PHP 5.4 PHP also has it's own internal werbserver, which you can start from CLI with

php -S localhost:8000

You can read more about that feature at http://php.net/manual/en/features.commandline.webserver.php


CakePHP is the closest. Your models/views/controllers directories will be the same. All of the concepts like routes, active record, plugins, and scaffolding are similar. The active record implementation supports associated models (one-to-many, many-to-many, etc). This is something that is lacking in other php ORM implementations.

Here's an old (April 2007) Ask Metafilter that had some folks contributing frameworks to look at: CakePHP, Symfony, Mojavi, Code Igniter are the PHP MVC frameworks recommended. They suggested CI and Symfony over Cake.

0

精彩评论

暂无评论...
验证码 换一张
取 消