|
- #!/usr/bin/env php
- <?php
- /**
- * 一个开发工具
- *
- * @version 2019年6月5日 tianya $
- * @package DedeCMS.Command
- * @copyright Copyright (c) 2007 - 2019, DesDev, Inc.
- */
- if (substr(php_sapi_name(), 0, 3) === 'cgi')
- {
- die("DedeCMS:needs php-cli to run\n\n");
- }
-
- if (count($argv) > 1 && $argv[1] == "serv") {
- // PHP5.4以下不支持内建服务器
- // 用于开发调试
- if (phpversion() < "5.4") {
- die("DedeCMS:command web server not support\n\n");
- }
- echo "Start Dev Server For DedeCMS\n\r";
- echo "Open http://localhost:8088\n\r";
- passthru(PHP_BINARY . ' -S localhost:8088 -t'.escapeshellarg('./src'));
- }
|